mapbox_gl_flutter_web library

Public API for mapbox_gl_flutter_web.

Web-only. Pair with mapbox_maps_flutter on mobile using conditional imports (see the README) — every type exported here has a same-named counterpart in mapbox_maps_flutter so call sites compile on both.

Classes

CameraBounds
Camera constraints + visible bounds, returned from MapboxMap.getBounds.
CameraBoundsOptions
Min/max zoom and pitch bounds.
CameraChangedEventData
Fired during camera motion.
CameraOptions
Camera target. Any subset of fields can be set.
CameraState
Current camera state.
CompassSettings
CoordinateBounds
SW + NE corners of an axis-aligned geographic bounding box.
GeoJsonSource
Spec for a GeoJSON source. Construct, then pass to Style.addSource. data is a stringified GeoJSON object (FeatureCollection or Feature).
GeoJsonSourceHandle
A handle to an existing GeoJSON source — used to swap the underlying data without rebuilding the source.
GesturesSettings
Subset of mapbox_maps_flutter's GesturesSettings exposing the toggles that round-trip cleanly to mapbox-gl-js's individual handlers. Extend if you need more.
Layer
Base class for layer specs. Mirrors mapbox_maps_flutter's mutable layer style — construct with id+sourceId, then set fields, then pass to Style.addLayer.
LayerPosition
Where in the layer stack to add a layer. Use below to insert beneath an existing layer id, above to insert above one, or at for an explicit index.
LineLayer
Line layer (rendered polylines).
MapAnimationOptions
Animation options for camera transitions.
MapboxMap
Web-side handle for a Mapbox map. Mirrors the relevant subset of mapbox_maps_flutter's MapboxMap so consumers can use the same call sites under conditional imports.
MapboxMapControl<T>
Generic settings holder for a UI control (scale bar, compass, gestures).
MapboxMapImpl
MapboxMapWidget
Embeds a Mapbox-GL-JS map. Call MapboxOptions.setAccessToken earlier in the app lifecycle so the tile API can authenticate.
MapboxOptions
Sets the Mapbox access token. Browsers require a public token (prefix pk.); secret tokens (sk.) are silently rejected by the tile API and produce a black canvas. Call once at app startup.
MapboxStyles
Mapbox-published style URIs. Same constants work for both mapbox_maps_flutter (mobile) and mapbox-gl-js (web).
MapContentGestureContext
Where the touch happened, in screen-space pixels.
MapIdleEventData
Fired after camera motion has settled.
MbxEdgeInsets
Edge insets (in logical pixels) used for camera padding.
Point
A geographic point. The single coordinate is wrapped in Position to match mapbox_maps_flutter's API shape.
Position
Longitude, latitude pair. Mapbox uses lng first, lat second for GeoJSON-style ordering; we match that convention.
QueriedFeature
QueriedFeatureInner
QueriedRenderedFeature
RenderedQueryGeometry
RenderedQueryOptions
ScaleBarSettings
ScreenCoordinate
A 2D screen-space coordinate (pixels).
Style
Handle for the map's style — used to add/get sources, layers, and runtime style image registrations.
SymbolLayer
Symbol layer (icon and/or text per feature).

Enums

IconAnchor
Symbol icon anchor position.
LineCap
Line endcap style.
LineJoin
Line join style.
TextAnchor
Text anchor for label placement.