Classes
Type Definitions
-
CustomAttribute{Object}
-
A description of a custom attribute to be passed on to the GPU, with a value different for each feature.
Properties:
Name Type Description namestring Attribute name.
callbackfunction This callback computes the numerical value of the attribute for a given feature (properties are available as 2nd arg for quicker access).
-
FeatureCacheItem{Object}
-
Object that holds a reference to a feature, its geometry and properties. Used to optimize rebuildBuffers by accessing these objects quicker.
Properties:
Name Type Description featurePointFeature Feature
propertiesObject.<string, *> Feature properties
flatCoordinatesCoordinate Point coordinates
-
Options{Object}
-
Properties:
Name Type Description classNamestring
(defaults to 'ol-layer')A CSS class name to set to the canvas element.
attributesArray<CustomAttribute> | undefined These attributes will be read from the features in the source and then passed to the GPU. The
nameproperty of each attribute will serve as its identifier: In the vertex shader as anattributeby prefixing it witha_In the fragment shader as avaryingby prefixing it withv_Please note that these can only be numerical values.vertexShaderstring Vertex shader source, mandatory.
fragmentShaderstring Fragment shader source, mandatory.
hitDetectionEnabledboolean | undefined Whether shader is hit detection aware.
uniformsObject<UniformValue> | undefined Uniform definitions for the post process steps Please note that
u_textureis reserved for the main texture slot andu_opacityis reserved for the layer opacity.postProcessesArray<PostProcessesOptions> | undefined Post-processes definitions
-
Point{Point}
-
-