VmLayerNative

The VmLayerNative component is used to load native layers onto the map. The supported layer types include 'fill', 'line', 'symbol', 'circle', 'heatmap', 'fill-extrusion', 'raster', 'hillshade', and 'background'. see. And a extension type 'raster-dem' for terrain.

Basic usage

Draw vector datas

3D Terrain

API

Props

NameDescriptionTypeDefault
idUnique layer name.string-
beforeIdThe ID of an existing layer to insert the new layer before, resulting in the new layer appearing visually beneath the existing layer. If this argument is not specified, the layer will be appended to the end of the layers array and appear visually above all other layers.string-
typeRendering type of this layer.enum-
metadataArbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'maplibre:'.object-
sourceName of a source description to be used for this layer. Required for all layer types except.string / object-
sourceLayerLayer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.string-
minzoomThe minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden. in range [0, 24].number-
maxzoomThe maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden. in range [0, 24].number-
filterA expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The feature-state expression is not supported in filter expressions.boolean / object-
layoutLayout properties for the layer.object-
paintDefault paint properties for this layer.object-

Events

NameDescriptionType
beforeLoadTriggers before the maplibreObject is loaded.Function
readyTriggers when the maplibreObject is successfully loaded.Function
unreadyTriggers when the maplibreObject loading failed.Function
destroyedTriggers when the maplibreObject is destroyed.Function

Exposes

NameDescriptionType
loadLoad the component manually.Function
unloadDestroy the loaded component manually.Function
reloadLoad the component manually.Function
creatingPromiseDetermine whether the component is created by this.object
maplibreObjectThe maplibreObject created by component.object
getMaplibreObjectGet the maplibreObject created by component.Function

Source

ComponentDocs

Contributors