Type Alias CommonShapeLayerOptions
beforeId?: string;
data: FeatureCollection | string;
layerId?: string;
maxzoom?: number;
minzoom?: number;
outline?: boolean;
outlineColor?: string | ZoomStringValues;
outlineOpacity?: number | ZoomNumberValues;
outlineWidth?: number | ZoomNumberValues;
sourceId?: string;
}
Index
Properties
OptionalbeforeId
data
A geojson Feature collection or a URL to a geojson or the UUID of a MapTiler Cloud dataset.
OptionallayerId
ID to give to the layer. If not provided, an auto-generated ID of the for "maptiler-layer-xxxxxx" will be auto-generated, with "xxxxxx" being a random string.
Optionalmaxzoom
Zoom level after which it no longer show.
Default: 22
Optionalminzoom
Zoom level at which it starts to show.
Default: 0
Optionaloutline
Whether or not to add an outline.
Default: false
OptionaloutlineColor
Color of the outline. This is can be a constant color string or a definition based on zoom levels.
Applies only if .outline is true.
Default: white
OptionaloutlineOpacity
Opacity of the outline. This is can be a constant opacity in [0, 1] or a definition based on zoom levels
Applies only if .outline is true.
Default: 1
OptionaloutlineWidth
Width of the outline (relative to screen-space). This is can be a constant width or a definition based on zoom levels.
Applies only if .outline is true.
Default: 1
OptionalsourceId
ID to give to the geojson source. If not provided, an auto-generated ID of the for "maptiler-source-xxxxxx" will be auto-generated, with "xxxxxx" being a random string.
The 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.