Add a new WebGLPointsLayer type using the shader builder utilities
This required adding a `a_index` attribute in the points layer renderer to be able to make the precomputed shaders to work.
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* Literal Style objects differ from standard styles in that they cannot
|
||||
* be functions and are made up of simple objects instead of classes.
|
||||
* @module ol/style/LiteralStyle
|
||||
*/
|
||||
|
||||
/**
|
||||
* Here are a few samples of literal style objects:
|
||||
* ```js
|
||||
* const style = {
|
||||
* symbol: {
|
||||
* symbolType: 'circle',
|
||||
* size: 8,
|
||||
* color: '#33AAFF',
|
||||
* opacity: 0.9
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* ```js
|
||||
* const style = {
|
||||
* symbol: {
|
||||
* symbolType: 'image',
|
||||
* offset: [0, 12],
|
||||
* size: [4, 8],
|
||||
* src: '../static/exclamation-mark.png'
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @typedef {Object} LiteralStyle
|
||||
* @property {LiteralSymbolStyle} [symbol] Symbol representation.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
*/
|
||||
export const SymbolType = {
|
||||
CIRCLE: 'circle',
|
||||
SQUARE: 'square',
|
||||
TRIANGLE: 'triangle',
|
||||
IMAGE: 'image'
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Object} LiteralSymbolStyle
|
||||
* @property {number|Array.<number, number>} size Size, mandatory.
|
||||
* @property {SymbolType} symbolType Symbol type to use, either a regular shape or an image.
|
||||
* @property {string} [src] Path to the image to be used for the symbol. Only required with `symbolType: 'image'`.
|
||||
* @property {import("../color.js").Color|string} [color='#FFFFFF'] Color used for the representation (either fill, line or symbol).
|
||||
* @property {number} [opacity=0] Opacity.
|
||||
* @property {Array.<number, number>} [offset] Offset on X and Y axis for symbols. If not specified, the symbol will be centered.
|
||||
* @property {Array.<number, number, number, number>} [textureCoord] Texture coordinates. If not specified, the whole texture will be used (range for 0 to 1 on both axes).
|
||||
* @property {boolean} [rotateWithView=false] Specify whether the symbol must rotate with the view or stay upwards.
|
||||
*/
|
||||
Reference in New Issue
Block a user