Skip to main content

Module style

Module style 

Source

Enums§

StyleInput

Functions§

filter_layers
Filter the style JSON’s “layers” array: plain ids or patterns (*, ?) keep the layers they match, --prefixed ones drop them. Returns the style and the patterns that matched no layer. Sources, sprite and glyphs are kept as they are.
filter_style_layers
As filter_layers, without the unmatched patterns.
layer_matches
Whether layer id id matches pattern: * matches any run of characters, ? any one; anything else matches itself.
validate_maplibre_style
Validate a resolved MapLibre GL style JSON string.