new MapboxViewer(_gisConfig, _gisMaps, _viewerConfig)
Creates a MapboxViewer instance.
| Name | Type | Description |
|---|---|---|
_gisConfig |
GIS configuration options. |
|
_gisMaps |
The GIS map instance. |
|
_viewerConfig |
Viewer configuration. |
Members
-
gisConfig
-
Gets the GIS configuration.
-
gisMaps
-
Gets the GIS maps instance.
-
viewerConfig
-
Gets the viewer configuration.
Methods
-
asyncclearHighlights(mapId, interactionType, highlightId)
MapboxViewer/index.ts, line 122 -
Clears highlights for a specific map, interaction type, and optionally a specific highlight ID.
Name Type Default Description mapIdmain The map ID, defaults to "main".
interactionTypeThe interaction type, defaults to "highlight".
highlightIdThe specific highlight ID to clear, if provided; otherwise clears all.
-
asyncdisableInteraction(interactionType, mapId)
MapboxViewer/index.ts, line 155 -
Disables a specific interaction for a map.
Name Type Default Description interactionTypeThe interaction type to disable.
mapIdmain The map ID, defaults to "main".
-
asyncenableInteraction(interactionType, options, mapId)
MapboxViewer/index.ts, line 136 -
Enables a specific interaction for a map.
Name Type Default Description interactionTypeThe interaction type to enable.
optionsOptions for the interaction.
mapIdmain The map ID, defaults to "main".
-
getMap(mapId)
MapboxViewer/index.ts, line 233 -
Gets the Mapbox GL JS map instance for direct access.
Name Type Default Description mapIdmain The map ID, defaults to "main".
Returns:
The Mapbox GL JS Map instance, or undefined if not available. -
asynchighlightFeatures(filters, mapId, interactionType)
MapboxViewer/index.ts, line 108 -
Highlights features based on filters for a specific map and interaction type.
Name Type Default Description filtersArray of filters per layer.
mapIdmain The map ID, defaults to "main".
interactionTypehighlight The interaction type, defaults to "highlight".
-
asyncinitialize()
MapboxViewer/index.ts, line 40 -
Initializes the viewer asynchronously.
-
isReady()
MapboxViewer/index.ts, line 69 -
Checks if the viewer is ready.
-
resize(mapId)
MapboxViewer/index.ts, line 247 -
Forces the map to resize and adjust to its container dimensions. This is useful when the container size changes programmatically.
Name Type Default Description mapIdmain The map ID to resize, defaults to "main".
-
asynctoggleRenderer()
MapboxViewer/index.ts, line 97 -
Toggles the renderer between Mapbox and OpenLayers.
-
asyncwaitUntilReady()
MapboxViewer/index.ts, line 59 -
Waits until the viewer is fully initialized.
