Contains the IDs of a source and its related layers.
Remarks
This type provides a convenient way to reference a MapLibre source and all its associated
layers. Using these IDs, you can customize the source and layers directly through the
MapLibre API.
Common Use Cases:
Accessing layers for custom styling
Modifying layer properties at runtime
Removing or updating data sources
Debugging layer hierarchies
Example
// Get source and layer IDs from a module const { sourceID, layerIDs } = routeModule.getSourceWithLayerIDs();
All layers in this array use the same source. The order typically represents
the rendering order, but check the actual map style for definitive ordering.
Example
// Hide all layers from this source layerIDs.forEach(id=> { map.setLayoutProperty(id, 'visibility', 'none'); });
sourceID
sourceID:string
The unique identifier of the MapLibre data source.
Remarks
Use this ID to access or modify the source via MapLibre's source API.
Contains the IDs of a source and its related layers.
Remarks
This type provides a convenient way to reference a MapLibre source and all its associated layers. Using these IDs, you can customize the source and layers directly through the MapLibre API.
Common Use Cases:
Example