Renders one icon glyph per point annotation. Each item's atlas key comes from getKind, or
fallback when that key isn't in the atlas.
Properties
getKind: ( layer: string, properties: Object ) => string | null
Chooses the atlas key to draw for each point.
fallback: string | null
Atlas key used when getKind's result isn't present in the atlas ( null draws nothing ).
Methods
new MVTIconGlyphs(
options?: {
// Chooses the atlas key to draw for each point.
getKind?: ( layer: string, properties: Object ) => string | null,
// Atlas key drawn when `getKind`'s result is missing from the atlas; null draws nothing.
fallback: string | null = null,
// Glyph size in pixels.
size: number = 18,
// Atlas slot size in pixels (defaults to `18 * devicePixelRatio`).
glyphSize?: number,
// Initial atlas slot capacity.
slotCount: number = 64
}
)