Layers
What is drawn, in the order the map holds them. Created with kind layer.
| Type | Class |
|---|---|
"composite-vector" | CompositeVectorTileLayer |
"elements" | VectorLayer |
"hillshade" | HillshadeRasterTileLayer |
"raster" | RasterTileLayer |
"solid" | SolidLayer |
"vector" | VectorTileLayer |
"composite-vector" — CompositeVectorTileLayer
{"type": "composite-vector", "source": …, "style": …}
| Key | Type | Always required | Notes |
|---|---|---|---|
source | object std::shared_ptr<TileDataSource> | yes | an id of kind source, or an inline spec |
style | object std::shared_ptr<VectorTileDecoder> | yes | an id of kind style, or an inline spec |
| Property | Type | Access | Description |
|---|---|---|---|
singlePassRenderingEnabled | boolean | read/write | Returns whether single-pass segmented rendering is enabled (Milestone 6, optional). |
Inherited from VectorTileLayer:
| Property | Type | Access | Description |
|---|---|---|---|
buildingRenderOrder | enum | read/write | Returns the current display order of the buildings. |
clickHandlerLayerFilter | string | read/write | Returns the click handler layer filter. The filter is given as ECMA regular expression that is applied to qualified layer names. |
clickRadius | number | read/write | Returns the click radius of vector tile features. Units are screen density independent pixels (DP or DIP). |
labelBlendingSpeed | number | read/write | Returns the current relative label blending speed. |
labelRenderOrder | enum | read/write | Returns the current display order of the labels. |
layerBlendingSpeed | number | read/write | Returns the current relative layer blending speed. |
rendererLayerFilter | string | read/write | Returns the renderer layer filter. The filter is given as ECMA regular expression that is applied to qualified layer names. |
tileCacheCapacity | integer | read/write | Returns the tile cache capacity. |
tileDecoder or style | object vectortiles.VectorTileDecoder | read-only | Returns the tile decoder assigned to this layer. |
vectorTileEventListener | object layers.VectorTileEventListener | read/write | Returns the vector tile event listener. |
Inherited from TileLayer:
| Property | Type | Access | Description |
|---|---|---|---|
UTFGridDataSource | object datasources.TileDataSource | read/write | Returns the tile data source of the associated UTF grid. By default this is null. |
UTFGridEventListener | object layers.UTFGridEventListener | read/write | Returns the UTF grid event listener. |
dataSource or source | object datasources.TileDataSource | read-only | Returns the data source assigned to this layer. |
frameNr | integer | read/write | Returns the current frame number. |
maxOverzoomLevel | integer | read/write | Gets the current maximum overzoom level for this layer. |
maxUnderzoomLevel | integer | read/write | Gets the current maximum underzoom level for this layer. |
preloading | boolean | read/write | Returns the state of the preloading flag of this layer. |
projection | object projections.Projection | read-only | Returns the projection this layer's data is in, which is its data source's. |
synchronizedRefresh | boolean | read/write | Returns the state of the synchronized refresh flag. |
tileLoadListener | object layers.TileLoadListener | read/write | Returns the tile load listener. |
tileSubstitutionPolicy | enum | read/write | Returns the current tile substitution policy. |
zoomLevelBias | number | read/write | Gets the current zoom level bias for this layer. |
Inherited from Layer:
| Property | Type | Access | Description |
|---|---|---|---|
cullDelay | integer | read/write | Returns the culling delay of the layer in milliseconds. |
metaData | struct std::map<std::string, massif::Variant> | read/write | Returns a copy of the layer meta data map. The changes you make to this map are NOT reflected in the actual meta data of the layer. |
opacity | number | read/write | Returns the opacity of this layer. |
postProcessed | boolean | read/write | Returns whether this layer goes through the post-process effect. |
updatePriority | integer | read/write | Returns the layer task priority of this layer. |
visible | boolean | read/write | Returns the visibility of this layer. |
visibleZoomRange | struct massif::MapRange | read/write | Returns the visible zoom range of this layer. |
| Method | Arguments | Returns |
|---|---|---|
clearTileCaches | all: bool | void |
refresh | — | void |
| Event | Payload | Consumable |
|---|---|---|
vectortile.clicked | VectorTileClickInfo | yes |
"elements" — VectorLayer
{"type": "elements", "source": …}
| Key | Type | Always required | Notes |
|---|---|---|---|
source | object std::shared_ptr<VectorDataSource> | yes | an id of kind source, or an inline spec |
| Property | Type | Access | Description |
|---|---|---|---|
ZBuffering | boolean | read/write | Returns true if Z-buffering is enabled for 2D geometry. By default it is disabled and used only for billboards. |
dataSource | object datasources.VectorDataSource | read-only | Returns the vector data source of this vector layer. |
vectorElementEventListener | object layers.VectorElementEventListener | read/write | Returns the vector element event listener. |
Inherited from Layer:
| Property | Type | Access | Description |
|---|---|---|---|
cullDelay | integer | read/write | Returns the culling delay of the layer in milliseconds. |
metaData | struct std::map<std::string, massif::Variant> | read/write | Returns a copy of the layer meta data map. The changes you make to this map are NOT reflected in the actual meta data of the layer. |
opacity | number | read/write | Returns the opacity of this layer. |
postProcessed | boolean | read/write | Returns whether this layer goes through the post-process effect. |
updatePriority | integer | read/write | Returns the layer task priority of this layer. |
visible | boolean | read/write | Returns the visibility of this layer. |
visibleZoomRange | struct massif::MapRange | read/write | Returns the visible zoom range of this layer. |
| Method | Arguments | Returns |
|---|---|---|
refresh | — | void |
| Event | Payload | Consumable |
|---|---|---|
vectorelement.clicked | VectorElementClickInfo | yes |
"hillshade" — HillshadeRasterTileLayer
{"type": "hillshade", "source": …}
| Key | Type | Always required | Notes |
|---|---|---|---|
source | object std::shared_ptr<TileDataSource> | yes | an id of kind source, or an inline spec |
| Property | Type | Access | Description |
|---|---|---|---|
accentColor | color | read/write | Returns the shading color used to accentuate rugged terrain like sharp cliffs and gorges. |
contourColor | color | read/write | Returns the contour line color. |
contourEnabled | boolean | read/write | Returns whether GPU contour lines are drawn over the hillshade. |
contourInterval | number | read/write | Returns the spacing between contour lines in meters. |
contourWidth | number | read/write | Returns the contour line half-width in screen pixels. |
contrast | number | read/write | Returns the contrast of the hillshade overlay. This is the equivalent of MapLibre's 'hillshade-exaggeration' paint property: it controls the slope response curve and the overall strength of the shading, not the relief itself. |
elevationEncodingEnabled | boolean | read/write | Returns whether the normal map encodes absolute elevation (so a custom normal-map lighting shader can call getElevation()). |
exagerateHeightScaleEnabled | boolean | read/write | Returns the normal vector tile should be exagerated based on the zoom level. |
exaggeration | number | read/write | Returns the per-frame relief exaggeration factor, i.e. the vertical exaggeration of the slope. Unlike height scale this is a shader uniform applied at render time (no tile re-decode), so it can be animated smoothly. |
heightScale | number | read/write | Returns the height scale of the hillshade overlay. |
highlightColor | color | read/write | Returns the shading color of areas that faces towards the light source. |
hillshadeMethod | enum | read/write | Returns the hillshade rendering method. |
illuminationDirection | struct massif::MapVec | read/write | Returns the illumination direction of the layer. |
illuminationMapRotationEnabled | boolean | read/write | Returns wheter the illumination direction should change with the map rotation. |
legacyHeightScaleEnabled | boolean | read/write | Returns whether the legacy (pre-MapLibre-parity) height scale formula is used. |
normalMapLightingShader | string | read/write | |
shadowColor | color | read/write | Returns the shading color of areas that face away from the light source. |
terrainPaintEnabled | boolean | read/write | Returns whether the layer may shade the 3D terrain's own elevation texture instead of loading a DEM tile set of its own. |
terrainPaintFullDetailEnabled | boolean | read/write | Returns whether the terrain paint shades from the elevation source's own maximum zoom. |
Inherited from CustomRasterTileLayer:
| Property | Type | Access | Description |
|---|---|---|---|
shaderSource | string | read/write | Returns the custom fragment shader source. |
Inherited from RasterTileLayer:
| Property | Type | Access | Description |
|---|---|---|---|
rasterTileEventListener | object layers.RasterTileEventListener | read/write | Returns the raster tile event listener. |
textureCacheCapacity | integer | read/write | Returns the tile texture cache capacity. |
tileBlendingSpeed | number | read/write | Returns the current relative tile blending speed. |
tileFilterMode | enum | read/write | Returns the current tile filter mode. |
Inherited from TileLayer:
| Property | Type | Access | Description |
|---|---|---|---|
UTFGridDataSource | object datasources.TileDataSource | read/write | Returns the tile data source of the associated UTF grid. By default this is null. |
UTFGridEventListener | object layers.UTFGridEventListener | read/write | Returns the UTF grid event listener. |
dataSource or source | object datasources.TileDataSource | read-only | Returns the data source assigned to this layer. |
frameNr | integer | read/write | Returns the current frame number. |
maxOverzoomLevel | integer | read/write | Gets the current maximum overzoom level for this layer. |
maxUnderzoomLevel | integer | read/write | Gets the current maximum underzoom level for this layer. |
preloading | boolean | read/write | Returns the state of the preloading flag of this layer. |
projection | object projections.Projection | read-only | Returns the projection this layer's data is in, which is its data source's. |
synchronizedRefresh | boolean | read/write | Returns the state of the synchronized refresh flag. |
tileLoadListener | object layers.TileLoadListener | read/write | Returns the tile load listener. |
tileSubstitutionPolicy | enum | read/write | Returns the current tile substitution policy. |
zoomLevelBias | number | read/write | Gets the current zoom level bias for this layer. |
Inherited from Layer:
| Property | Type | Access | Description |
|---|---|---|---|
cullDelay | integer | read/write | Returns the culling delay of the layer in milliseconds. |
metaData | struct std::map<std::string, massif::Variant> | read/write | Returns a copy of the layer meta data map. The changes you make to this map are NOT reflected in the actual meta data of the layer. |
opacity | number | read/write | Returns the opacity of this layer. |
postProcessed | boolean | read/write | Returns whether this layer goes through the post-process effect. |
updatePriority | integer | read/write | Returns the layer task priority of this layer. |
visible | boolean | read/write | Returns the visibility of this layer. |
visibleZoomRange | struct massif::MapRange | read/write | Returns the visible zoom range of this layer. |
| Method | Arguments | Returns |
|---|---|---|
clearTileCaches | all: bool | void |
getElevation | pos: pos | float |
getElevations | positions: positions | doubles |
refresh | — | void |
"raster" — RasterTileLayer
{"type": "raster", "source": …}
| Key | Type | Always required | Notes |
|---|---|---|---|
source | object std::shared_ptr<TileDataSource> | yes | an id of kind source, or an inline spec |
| Property | Type | Access | Description |
|---|---|---|---|
rasterTileEventListener | object layers.RasterTileEventListener | read/write | Returns the raster tile event listener. |
textureCacheCapacity | integer | read/write | Returns the tile texture cache capacity. |
tileBlendingSpeed | number | read/write | Returns the current relative tile blending speed. |
tileFilterMode | enum | read/write | Returns the current tile filter mode. |
Inherited from TileLayer:
| Property | Type | Access | Description |
|---|---|---|---|
UTFGridDataSource | object datasources.TileDataSource | read/write | Returns the tile data source of the associated UTF grid. By default this is null. |
UTFGridEventListener | object layers.UTFGridEventListener | read/write | Returns the UTF grid event listener. |
dataSource or source | object datasources.TileDataSource | read-only | Returns the data source assigned to this layer. |
frameNr | integer | read/write | Returns the current frame number. |
maxOverzoomLevel | integer | read/write | Gets the current maximum overzoom level for this layer. |
maxUnderzoomLevel | integer | read/write | Gets the current maximum underzoom level for this layer. |
preloading | boolean | read/write | Returns the state of the preloading flag of this layer. |
projection | object projections.Projection | read-only | Returns the projection this layer's data is in, which is its data source's. |
synchronizedRefresh | boolean | read/write | Returns the state of the synchronized refresh flag. |
tileLoadListener | object layers.TileLoadListener | read/write | Returns the tile load listener. |
tileSubstitutionPolicy | enum | read/write | Returns the current tile substitution policy. |
zoomLevelBias | number | read/write | Gets the current zoom level bias for this layer. |
Inherited from Layer:
| Property | Type | Access | Description |
|---|---|---|---|
cullDelay | integer | read/write | Returns the culling delay of the layer in milliseconds. |
metaData | struct std::map<std::string, massif::Variant> | read/write | Returns a copy of the layer meta data map. The changes you make to this map are NOT reflected in the actual meta data of the layer. |
opacity | number | read/write | Returns the opacity of this layer. |
postProcessed | boolean | read/write | Returns whether this layer goes through the post-process effect. |
updatePriority | integer | read/write | Returns the layer task priority of this layer. |
visible | boolean | read/write | Returns the visibility of this layer. |
visibleZoomRange | struct massif::MapRange | read/write | Returns the visible zoom range of this layer. |
| Method | Arguments | Returns |
|---|---|---|
clearTileCaches | all: bool | void |
refresh | — | void |
"solid" — SolidLayer
{"type": "solid", "color": …}
{"type": "solid", "bitmap": …}
| Key | Type | Always required | Notes |
|---|---|---|---|
color | struct Color | no | |
bitmap | object std::shared_ptr<Bitmap> | no | an id of kind bitmap, or an inline spec |
| Property | Type | Access | Description |
|---|---|---|---|
bitmap | object std::shared_ptr<massif::Bitmap> | read/write | Returns the bitmap of this layer. |
bitmapScale | number | read/write | Returns the bitmap scaling factor. |
color | color | read/write | Returns the color of this layer. |
Inherited from Layer:
| Property | Type | Access | Description |
|---|---|---|---|
cullDelay | integer | read/write | Returns the culling delay of the layer in milliseconds. |
metaData | struct std::map<std::string, massif::Variant> | read/write | Returns a copy of the layer meta data map. The changes you make to this map are NOT reflected in the actual meta data of the layer. |
opacity | number | read/write | Returns the opacity of this layer. |
postProcessed | boolean | read/write | Returns whether this layer goes through the post-process effect. |
updatePriority | integer | read/write | Returns the layer task priority of this layer. |
visible | boolean | read/write | Returns the visibility of this layer. |
visibleZoomRange | struct massif::MapRange | read/write | Returns the visible zoom range of this layer. |
| Method | Arguments | Returns |
|---|---|---|
refresh | — | void |
"vector" — VectorTileLayer
{"type": "vector", "source": …, "style": …}
| Key | Type | Always required | Notes |
|---|---|---|---|
source | object std::shared_ptr<TileDataSource> | yes | an id of kind source, or an inline spec |
style | object std::shared_ptr<VectorTileDecoder> | yes | an id of kind style, or an inline spec |
| Property | Type | Access | Description |
|---|---|---|---|
buildingRenderOrder | enum | read/write | Returns the current display order of the buildings. |
clickHandlerLayerFilter | string | read/write | Returns the click handler layer filter. The filter is given as ECMA regular expression that is applied to qualified layer names. |
clickRadius | number | read/write | Returns the click radius of vector tile features. Units are screen density independent pixels (DP or DIP). |
labelBlendingSpeed | number | read/write | Returns the current relative label blending speed. |
labelRenderOrder | enum | read/write | Returns the current display order of the labels. |
layerBlendingSpeed | number | read/write | Returns the current relative layer blending speed. |
rendererLayerFilter | string | read/write | Returns the renderer layer filter. The filter is given as ECMA regular expression that is applied to qualified layer names. |
tileCacheCapacity | integer | read/write | Returns the tile cache capacity. |
tileDecoder or style | object vectortiles.VectorTileDecoder | read-only | Returns the tile decoder assigned to this layer. |
vectorTileEventListener | object layers.VectorTileEventListener | read/write | Returns the vector tile event listener. |
Inherited from TileLayer:
| Property | Type | Access | Description |
|---|---|---|---|
UTFGridDataSource | object datasources.TileDataSource | read/write | Returns the tile data source of the associated UTF grid. By default this is null. |
UTFGridEventListener | object layers.UTFGridEventListener | read/write | Returns the UTF grid event listener. |
dataSource or source | object datasources.TileDataSource | read-only | Returns the data source assigned to this layer. |
frameNr | integer | read/write | Returns the current frame number. |
maxOverzoomLevel | integer | read/write | Gets the current maximum overzoom level for this layer. |
maxUnderzoomLevel | integer | read/write | Gets the current maximum underzoom level for this layer. |
preloading | boolean | read/write | Returns the state of the preloading flag of this layer. |
projection | object projections.Projection | read-only | Returns the projection this layer's data is in, which is its data source's. |
synchronizedRefresh | boolean | read/write | Returns the state of the synchronized refresh flag. |
tileLoadListener | object layers.TileLoadListener | read/write | Returns the tile load listener. |
tileSubstitutionPolicy | enum | read/write | Returns the current tile substitution policy. |
zoomLevelBias | number | read/write | Gets the current zoom level bias for this layer. |
Inherited from Layer:
| Property | Type | Access | Description |
|---|---|---|---|
cullDelay | integer | read/write | Returns the culling delay of the layer in milliseconds. |
metaData | struct std::map<std::string, massif::Variant> | read/write | Returns a copy of the layer meta data map. The changes you make to this map are NOT reflected in the actual meta data of the layer. |
opacity | number | read/write | Returns the opacity of this layer. |
postProcessed | boolean | read/write | Returns whether this layer goes through the post-process effect. |
updatePriority | integer | read/write | Returns the layer task priority of this layer. |
visible | boolean | read/write | Returns the visibility of this layer. |
visibleZoomRange | struct massif::MapRange | read/write | Returns the visible zoom range of this layer. |
| Method | Arguments | Returns |
|---|---|---|
clearTileCaches | all: bool | void |
refresh | — | void |
| Event | Payload | Consumable |
|---|---|---|
vectortile.clicked | VectorTileClickInfo | yes |
Base classes
Not constructed directly. Their properties are reachable on every object above that derives from them.
CustomRasterTileLayer
| Property | Type | Access | Description |
|---|---|---|---|
shaderSource | string | read/write | Returns the custom fragment shader source. |
Inherited from RasterTileLayer:
| Property | Type | Access | Description |
|---|---|---|---|
rasterTileEventListener | object layers.RasterTileEventListener | read/write | Returns the raster tile event listener. |
textureCacheCapacity | integer | read/write | Returns the tile texture cache capacity. |
tileBlendingSpeed | number | read/write | Returns the current relative tile blending speed. |
tileFilterMode | enum | read/write | Returns the current tile filter mode. |
Inherited from TileLayer:
| Property | Type | Access | Description |
|---|---|---|---|
UTFGridDataSource | object datasources.TileDataSource | read/write | Returns the tile data source of the associated UTF grid. By default this is null. |
UTFGridEventListener | object layers.UTFGridEventListener | read/write | Returns the UTF grid event listener. |
dataSource or source | object datasources.TileDataSource | read-only | Returns the data source assigned to this layer. |
frameNr | integer | read/write | Returns the current frame number. |
maxOverzoomLevel | integer | read/write | Gets the current maximum overzoom level for this layer. |
maxUnderzoomLevel | integer | read/write | Gets the current maximum underzoom level for this layer. |
preloading | boolean | read/write | Returns the state of the preloading flag of this layer. |
projection | object projections.Projection | read-only | Returns the projection this layer's data is in, which is its data source's. |
synchronizedRefresh | boolean | read/write | Returns the state of the synchronized refresh flag. |
tileLoadListener | object layers.TileLoadListener | read/write | Returns the tile load listener. |
tileSubstitutionPolicy | enum | read/write | Returns the current tile substitution policy. |
zoomLevelBias | number | read/write | Gets the current zoom level bias for this layer. |
Inherited from Layer:
| Property | Type | Access | Description |
|---|---|---|---|
cullDelay | integer | read/write | Returns the culling delay of the layer in milliseconds. |
metaData | struct std::map<std::string, massif::Variant> | read/write | Returns a copy of the layer meta data map. The changes you make to this map are NOT reflected in the actual meta data of the layer. |
opacity | number | read/write | Returns the opacity of this layer. |
postProcessed | boolean | read/write | Returns whether this layer goes through the post-process effect. |
updatePriority | integer | read/write | Returns the layer task priority of this layer. |
visible | boolean | read/write | Returns the visibility of this layer. |
visibleZoomRange | struct massif::MapRange | read/write | Returns the visible zoom range of this layer. |
| Method | Arguments | Returns |
|---|---|---|
clearTileCaches | all: bool | void |
refresh | — | void |
Layer
| Property | Type | Access | Description |
|---|---|---|---|
cullDelay | integer | read/write | Returns the culling delay of the layer in milliseconds. |
metaData | struct std::map<std::string, massif::Variant> | read/write | Returns a copy of the layer meta data map. The changes you make to this map are NOT reflected in the actual meta data of the layer. |
opacity | number | read/write | Returns the opacity of this layer. |
postProcessed | boolean | read/write | Returns whether this layer goes through the post-process effect. |
updatePriority | integer | read/write | Returns the layer task priority of this layer. |
visible | boolean | read/write | Returns the visibility of this layer. |
visibleZoomRange | struct massif::MapRange | read/write | Returns the visible zoom range of this layer. |
| Method | Arguments | Returns |
|---|---|---|
refresh | — | void |
TileLayer
| Property | Type | Access | Description |
|---|---|---|---|
UTFGridDataSource | object datasources.TileDataSource | read/write | Returns the tile data source of the associated UTF grid. By default this is null. |
UTFGridEventListener | object layers.UTFGridEventListener | read/write | Returns the UTF grid event listener. |
dataSource or source | object datasources.TileDataSource | read-only | Returns the data source assigned to this layer. |
frameNr | integer | read/write | Returns the current frame number. |
maxOverzoomLevel | integer | read/write | Gets the current maximum overzoom level for this layer. |
maxUnderzoomLevel | integer | read/write | Gets the current maximum underzoom level for this layer. |
preloading | boolean | read/write | Returns the state of the preloading flag of this layer. |
projection | object projections.Projection | read-only | Returns the projection this layer's data is in, which is its data source's. |
synchronizedRefresh | boolean | read/write | Returns the state of the synchronized refresh flag. |
tileLoadListener | object layers.TileLoadListener | read/write | Returns the tile load listener. |
tileSubstitutionPolicy | enum | read/write | Returns the current tile substitution policy. |
zoomLevelBias | number | read/write | Gets the current zoom level bias for this layer. |
Inherited from Layer:
| Property | Type | Access | Description |
|---|---|---|---|
cullDelay | integer | read/write | Returns the culling delay of the layer in milliseconds. |
metaData | struct std::map<std::string, massif::Variant> | read/write | Returns a copy of the layer meta data map. The changes you make to this map are NOT reflected in the actual meta data of the layer. |
opacity | number | read/write | Returns the opacity of this layer. |
postProcessed | boolean | read/write | Returns whether this layer goes through the post-process effect. |
updatePriority | integer | read/write | Returns the layer task priority of this layer. |
visible | boolean | read/write | Returns the visibility of this layer. |
visibleZoomRange | struct massif::MapRange | read/write | Returns the visible zoom range of this layer. |
| Method | Arguments | Returns |
|---|---|---|
clearTileCaches | all: bool | void |
refresh | — | void |