new MapboxRenderer(gisMap, viewerConfig)
Creates a Mapbox renderer instance.
| Name | Type | Description |
|---|---|---|
gisMap |
The GIS map instance. |
|
viewerConfig |
Viewer configuration. |
Extends
- undefined
Members
-
domElement
-
Gets the DOM element of the renderer.
-
mapboxMap
-
Gets the Mapbox map instance.
-
type
-
Gets the renderer type.
Methods
-
addLayer(layer)
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 262 -
Adds a layer to the map.
Name Type Description layerLayer configuration.
-
addSource(id, source)
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 250 -
Adds a source to the map.
Name Type Description idSource ID.
sourceSource data.
-
destroy()
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 313 -
Destroys the renderer and cleans up resources.
-
fitBoundsWGS84(bounds)
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 301 -
Fits the map to the given bounds in WGS84.
Name Type Description boundsBounds as [[lng, lat], [lng, lat]].
-
getBoundsWGS84()
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 290 -
Gets the bounds in WGS84.
Returns:
Bounds as [[lng, lat], [lng, lat]]. -
getViewState()
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 92 -
Gets the current view state of the map.
Returns:
The view state. -
hide()
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 233 -
Hides the renderer.
-
removeLayer(layerId)
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 274 -
Removes a layer from the map.
Name Type Description layerIdLayer ID.
-
removeSource(sourceId)
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 282 -
Removes a source from the map.
Name Type Description sourceIdSource ID.
-
render()
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 134 -
Renders the Mapbox map.
-
setViewState(v)
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 110 -
Sets the view state of the map.
Name Type Description vThe view state to set.
-
setupResizeObserver()
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 47 -
Sets up a ResizeObserver to automatically resize the map when the container changes size.
-
show()
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 240 -
Shows the renderer.
-
asyncwaitUntilReady()
MapboxViewer/infrastructure/adapters/renderers/MapboxRenderer.ts, line 220 -
Waits until the renderer is fully ready.
