Expand description
Labels and map features: select parts of a style to stack basemaps.
Every style layer is either a label (a symbol layer: text and icons)
or not, and belongs to one feature: water, roads, buildings, … (see
FEATURES). labels keeps all layers, drops the labels or keeps only
them; features keeps or drops features. The two combine:
features = ["roads"] with labels only is the road names.
A layer’s feature comes from its vector tile source-layer, through
tables for the common schemas (OpenMapTiles: OpenFreeMap, Stadia,
MapTiler; Protomaps: CARTO; Shortbread: VersaTiles), then keywords that
also cover Esri’s descriptive layer names ("Water area", "Road"),
then keywords in the layer id. Raster tiles have their labels drawn in;
catalogue basemaps with label-free or label-only tiles switch to those
(see crate::providers).
Structs§
Enums§
- Labels
- Which labels to keep.
Constants§
- FEATURES
- The features layers are sorted into, with what each covers.
Functions§
- is_
label - Whether a style layer is a label (text or icons).
- layer_
feature - The feature a style layer belongs to (one of
FEATURES). - select
style_jsonwith only the layerslabelsandfeaturesselect. A catalogue raster basemap switches to its label-free or label-only tiles instead. A selection may leave no layer (select_layersmakes that an error).- select_
layers - As
select, with a selection that leaves nothing to draw an error that lists the style’s features. - validate_
features - Check a
featuresfilter without applying it.