maplibre style spec
Optional
options: { excludeTerraDrawLayers?: boolean; onlyTerraDrawLayers?: boolean }Optional
excludeTerraDrawLayers?: booleanreturn maplibre style without terradraw layers and sources
Optional
onlyTerraDrawLayers?: booleanreturn maplibre style with only terradraw layers and sources
terradraw related source IDs (internally used). Use TERRADRAW_SOURCE_IDS or TERRADRAW_MEASURE_SOURCE_IDS
prefix to use for source IDs, default is 'td'. {prefix} will be replaced with this prefixId
maplibre style spec
clean maplibre style to filter only for terradraw related layers or without them. If options are not set, returns original style given to the function.
This can be useful incase users only want to get terradraw related layers or without it.
Usage:
cleanMaplibreStyle(map.getStyle, { excludeTerraDrawLayers: true})
cleanMaplibreStyle(map.getStyle, { onlyTerraDrawLayers: true})