Class: MapboxViewer

MapboxViewer

Main entry point for the MapboxViewer, managing map rendering and orchestration.

new MapboxViewer(_gisConfig, _gisMaps, _viewerConfig)

MapboxViewer/index.ts, line 16

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
mapId main

The map ID, defaults to "main".

interactionType

The interaction type, defaults to "highlight".

highlightId

The 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
interactionType

The interaction type to disable.

mapId main

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
interactionType

The interaction type to enable.

options

Options for the interaction.

mapId main

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
mapId main

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
filters

Array of filters per layer.

mapId main

The map ID, defaults to "main".

interactionType highlight

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
mapId main

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.