new StyleApplier()
MapboxViewer/infrastructure/adapters/mapbox/StyleApplier.ts, line 5
Methods
-
asyncaddIconsFromMeta(map, iconsMeta)
MapboxViewer/infrastructure/adapters/mapbox/StyleApplier.ts, line 65 -
Adds icons from metadata to the map.
Name Type Description mapThe Mapbox map.
iconsMetaIcons metadata.
-
addLayerSafe(map, layer)
MapboxViewer/infrastructure/adapters/mapbox/StyleApplier.ts, line 44 -
Adds a layer to the map if it doesn't exist.
Name Type Description mapThe Mapbox map.
layerLayer configuration.
-
addSourceSafe(map, id, source)
MapboxViewer/infrastructure/adapters/mapbox/StyleApplier.ts, line 34 -
Adds a source to the map if it doesn't exist.
Name Type Description mapThe Mapbox map.
idSource ID.
sourceSource data.
-
setVisibility(map, layerId, visible)
MapboxViewer/infrastructure/adapters/mapbox/StyleApplier.ts, line 55 -
Sets the visibility of a layer.
Name Type Description mapThe Mapbox map.
layerIdLayer ID.
visibleVisibility flag.
-
waitForStyle(map, timeoutMs)
MapboxViewer/infrastructure/adapters/mapbox/StyleApplier.ts, line 17 -
Waits for the map style to load.
Name Type Default Description mapThe Mapbox map instance.
timeoutMs20000 Timeout in milliseconds.
Returns:
Promise that resolves when style is loaded.
