mapbox_maps_flutter library

Classes

AmbientLight
An indirect light affecting all objects in the map adding a constant amount of light on them. It has no explicit direction and cannot cast shadows.
AttributionSettings
Shows the attribution icon on the map.
AttributionSettingsInterface
Shows the attribution icon on the map.
BackgroundLayer
The background color or pattern of the map.
BaseAnnotationManager
The super class for all AnnotationManagers.
BBox
Please make sure, you arrange your parameters like this: Longitude 1, Latitude 1, Altitude 1 (optional), Longitude 2, Latitude 2, Altitude 2 (optional) You can either specify 4 or 6 parameters If you are using the default constructor with two dimensional positions (lng + lat only), please use the constructor like this: BBox(lng1, lat1, lng2, lat2);
CameraBounds
Holds information about camera bounds.
CameraBoundsOptions
Holds options to be used for setting camera bounds.
CameraChangedEventData
The class for camera-changed event in Observer
CameraOptions
Various options for describing the viewpoint of a camera. All fields are optional.
CameraState
Describes the viewpoint of a camera.
Cancelable
Allows to cancel the associated asynchronous operation
CanonicalTileID
Represents a tile coordinate.
CircleAnnotation
CircleAnnotationManager
The CircleAnnotationManager to add/update/delete CircleAnnotationAnnotations on the map.
CircleAnnotationOptions
CircleLayer
A filled circle.
CompassSettings
Shows the compass on the map.
CompassSettingsInterface
Shows the compass on the map.
CoordinateBounds
A rectangular area as measured on a two-dimensional map projection.
CoordinateBoundsZoom
A coordinate bounds and zoom.
CoordinateType
Coordinate types, following https://tools.ietf.org/html/rfc7946#section-4
DefaultLocationPuck2D
Default 2D location indicator appearance.
DirectionalLight
A light that has a direction and is located at infinite, so its rays are parallel. Simulates the sun light and it can cast shadows
Error
The data class for error in Observer
EventTimeInterval
List of supported event types by the map and map snapshotter objects, and event data format specification for each event.
Feature<T extends GeometryObject>
Feature, as specified here https://tools.ietf.org/html/rfc7946#section-3.2
FeatureCollection<T extends GeometryObject>
FeatureCollection, as specified here https://tools.ietf.org/html/rfc7946#section-3.3
FeatureExtensionValue
A value or a collection of a feature extension.
FillExtrusionLayer
An extruded (3D) polygon.
FillLayer
A filled polygon with an optional stroked border.
FlatLight
A global directional light source which is only applied on 3D layers and hillshade layers. Using this type disables other light sources.
GeoJSONObject
GeoJsonSource
A GeoJSON data source. @see The online documentation
GeometryCollection
GeometryCollection, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.8
GeometryObject
GeometryType<T>
GestureListener
GesturesSettings
Gesture configuration allows to control the user touch interaction.
GesturesSettingsInterface
Gesture configuration allows to control the user touch interaction.
GlyphsRasterizationOptions
Describes the glyphs rasterization option values.
HeatmapLayer
A heatmap.
HillshadeLayer
Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.
ImageContent
Describes the image content, e.g. where text can be fit into an image.
ImageSource
An image data source. @see The online documentation
ImageStretches
Describes the image stretch areas.
Layer
Super class for all different types of layers.
LayerPosition
Specifies position of a layer that is added via addStyleLayer method.
LayerSlot
A pre-specified location in the style where layer will be added to. (such as on top of existing land layers, but below all labels).
LineLayer
A stroked line.
LineString
LocationComponentSettings
Shows a location puck on the map.
LocationIndicatorLayer
Location Indicator layer.
LocationPuck
Defines what the customised look of the location puck. Note that direct changes to the puck variables won't have any effect, a new puck needs to be set every time.
LocationPuck2D
LocationPuck3D
LocationSettings
Shows a location puck on the map.
LogConfiguration
A class that allows to configure Mapbox SDKs logging per application.
LogoSettings
Shows the Mapbox logo on the map.
LogoSettingsInterface
Shows the Mapbox logo on the map.
LogWriterBackend
An interface for implementing log writing backends, e.g. for using platform specific log backends or logging to a notification service.
MapAnimationOptions
MapboxMap
Controller for a single MapboxMap instance running on the host platform.
MapboxMapsOptions
Configurations for the external resources that are used by Maps API object, such as maps data directory and base URL.
MapboxOptions
Class for Mapbox SDK settings management
MapboxStyles
A convenience object to access the style ID strings of the professionally-designed map styles made by Mapbox.
MapContentGestureContext
A structure that defines additional information about map content gesture.
MapDebugOptions
Options for enabling debugging features in a map.
MapIdleEventData
The class for map-idle event in Observer
MapLoadedEventData
The class for map-loaded event in Observer
MapLoadingErrorEventData
The class for map-loading-error event in Observer
MapOptions
Describes the map option values.
MapSnapshotOptions
Set of options for taking map snapshot with map snapshotter.
MapWidget
A MapWidget provides an embeddable map interface. You use this class to display map information and to manipulate the map contents from your application. You can center the map on a given coordinate, specify the size of the area you want to display, and style the features of the map to fit your application's use case.
MbxEdgeInsets
The distance on each side between rectangles, when one is contained into other.
MbxImage
Image type.
MercatorCoordinate
Describes a point on the map in Mercator projection.
MultiLineString
MultiLineString, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.5
MultiPoint
MultiPoint, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.3
MultiPolygon
MultiPolygon, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.7
OfflineRegion
An offline region represents an identifiable geographic region with optional metadata.
OfflineRegionGeometryDefinition
An offline region definition is a geographic region defined by a style URL, a geometry, zoom range, and device pixel ratio. Both minZoom and maxZoom must be ≥ 0, and maxZoom must be ≥ minZoom. The maxZoom may be ∞, in which case for each tile source, the region will include tiles from minZoom up to the maximum zoom level provided by that source. The pixelRatio must be ≥ 0 and should typically be 1.0 or 2.0.
OfflineRegionManager
The offline region manager that manages offline packs. All of the class’s instance methods are asynchronous reflecting the fact that offline resources are stored in a database. The offline manager maintains a canonical collection of offline packs.
OfflineRegionTilePyramidDefinition
An offline region definition is a geographic region defined by a style URL, geographic bounding box, zoom range, and device pixel ratio. Both minZoom and maxZoom must be ≥ 0, and maxZoom must be ≥ minZoom. The maxZoom may be ∞, in which case for each tile source, the region will include tiles from minZoom up to the maximum zoom level provided by that source. The pixelRatio must be ≥ 0 and should typically be 1.0 or 2.0.
OfflineSwitch
Instance that allows connecting or disconnecting the Mapbox stack to the network.
OnCircleAnnotationClickListener
OnPointAnnotationClickListener
OnPolygonAnnotationClickListener
OnPolylineAnnotationClickListener
OnSnapshotStyleListener
Point
PointAnnotation
PointAnnotationManager
The PointAnnotationManager to add/update/delete PointAnnotationAnnotations on the map.
PointAnnotationOptions
Polygon
PolygonAnnotation
PolygonAnnotationManager
The PolygonAnnotationManager to add/update/delete PolygonAnnotationAnnotations on the map.
PolygonAnnotationOptions
PolylineAnnotation
PolylineAnnotationManager
The PolylineAnnotationManager to add/update/delete PolylineAnnotationAnnotations on the map.
PolylineAnnotationOptions
Position
Please make sure, you arrange your parameters like this:
ProjectedMeters
ProjectedMeters is a coordinate in a specific Spherical Mercator projection.
Projection
Collection of Spherical Mercator projection methods.
QueriedFeature
Represents query result that is returned in QueryFeaturesCallback. @see queryRenderedFeatures or querySourceFeatures
QueriedRenderedFeature
Represents query result that is returned in QueryRenderedFeaturesCallback. @see queryRenderedFeatures
QueriedSourceFeature
Represents query result that is returned in QuerySourceFeaturesCallback. @see querySourceFeatures
RasterArraySource
A raster array source @see The online documentation
RasterDataLayer
The description of the raster data layers and the bands contained within the tiles.
RasterDemSource
A RGB-encoded raster DEM source @see The online documentation
RasterLayer
Raster map textures such as satellite imagery.
RasterSource
A raster tile source. @see The online documentation
RenderedQueryGeometry
Geometry for querying rendered features.
RenderedQueryOptions
Options for querying rendered features.
RenderFrameFinishedEventData
The class for render-frame-finished event in Observer
RenderFrameStartedEventData
The class for render-frame-started event in Observer
Request
The request data class that included in EventData
ResourceEventData
The class for event in Observer
Response
The response data class that included in EventData
ScaleBarSettings
Shows the scale bar on the map.
ScaleBarSettingsInterface
Shows the scale bar on the map.
ScreenBox
Describes the coordinate box on the screen, measured in logical pixels from top to bottom and from left to right.
ScreenCoordinate
Describes the coordinate on the screen, measured from top to bottom and from left to right. Note: the map uses screen coordinate units measured in logical pixels.
Settings
Settings class provides non-persistent, in-process key-value storage.
Size
Size type.
SkyLayer
A spherical dome around the map that is always rendered behind all other layers.
Snapshotter
A utility class for capturing styled map snapshots.
Source
Super class for all different types of sources.
SourceAddedEventData
The class for source-added event in Observer
SourceDataLoadedEventData
The class for source-data-loaded event in Observer
SourceQueryOptions
Options for querying source features.
SourceRemovedEventData
The class for source-removed event in Observer
StyleDataLoadedEventData
The class for style-data-loaded event in Observer
StyleImageMissingEventData
The class for style-image-missing event in Observer
StyleImageUnusedEventData
The class for style-image-remove-unused event in Observer
StyleLoadedEventData
The class for style-loaded event in Observer
StyleManager
Interface for managing style of the map.
StyleObjectInfo
The information about style object (source or layer).
StyleProjection
StylePropertyValue
Holds a style property value with meta data.
StyleTransition
Define the duration and delay for a style transition.
SymbolLayer
An icon or a text label.
TileCacheBudget
Defines a resource budget, either in tile units or in megabytes.
TileCacheBudgetInMegabytes
Map memory budget in megabytes.
TileCacheBudgetInTiles
Map memory budget in tiles.
TileCoverOptions
Various options needed for tile cover.
TileID
Defines the tile id in a source-data-loaded event.
TilesetDescriptor
A bundle that encapsulates tilesets creation for the tile store implementation.
TransitionOptions
The transition options controls timing for the interpolation between a transitionable style property's previous value and new value. These can be used to define the style default property transition behavior. Also, any transitionable style property may also have its own -transition property that defines specific transition timing for that specific layer property, overriding the global transition values.
VectorSource
A vector tile source. @see The online documentation

Enums

Anchor
Whether extruded geometries are lit relative to the map or viewport.
AndroidPlatformViewHostingMode
A mode for platform MapView to be hosted in Flutter on Android platform.
CirclePitchAlignment
Orientation of circle when map is pitched.
CirclePitchScale
Controls the scaling behavior of the circle when the map is pitched.
CircleTranslateAnchor
Controls the frame of reference for circle-translate.
ConstrainMode
Describes whether to constrain the map in both axes or only vertically e.g. while panning.
ContextMode
Describes the map context mode. We can make some optimizations if we know that the drawing context is not shared with other code.
Corner
DataSourceType
Describes data source of request for resource-request event. @param value String value of this enum
DownloadErrorCode
Enum which represents different error cases which could happen during download session.
DownloadState
Enum representing state of download session.
Encoding
The encoding used by this source. Mapbox Terrain RGB is used by default
FillExtrusionTranslateAnchor
Controls the frame of reference for fill-extrusion-translate.
FillTranslateAnchor
Controls the frame of reference for fill-translate.
GeoJSONObjectType
GlyphsRasterizationMode
Describes glyphs rasterization modes.
Grid
HillshadeIlluminationAnchor
Direction of light source when map is rotated.
HttpMethod
HTTP defines a set of request methods to indicate the desired action to be performed for a given resource.
HttpRequestErrorType
Enum which describes possible error types which could happen during HTTP request/download calls.
IconAnchor
Part of the icon placed closest to the anchor.
IconPitchAlignment
Orientation of icon when map is pitched.
IconRotationAlignment
In combination with symbol-placement, determines the rotation behavior of icons.
IconTextFit
Scales the icon to fit around the associated text.
IconTranslateAnchor
Controls the frame of reference for icon-translate.
LineCap
The display of line endings.
LineJoin
The display of lines when joining.
LineTranslateAnchor
Controls the frame of reference for line-translate.
LoggingLevel
MapDebugOptionsData
Options for enabling debugging features in a map.
MapLoadErrorType
Describes an error type while loading the map. Defines what resource could not be loaded.
ModelScaleMode
Defines scaling mode. Only applies to location-indicator type layers.
ModelType
NetworkRestriction
Classify network types based on cost.
NorthOrientation
Describes the map orientation.
OfflineRegionDownloadState
Describes the download state of a region.
OrnamentPosition
PuckBearing
The enum controls how the puck is oriented
RasterResampling
The resampling/interpolation method to use for overscaling, also known as texture magnification filter
RenderMode
Describes whether a map or frame has been fully rendered or not. @param value String value of this enum
RequestLoadingMethodType
The enumeration defines the method used to make a resource request.
RequestPriority
Describes priority for request object. @param value String value of this enum
RequestType
Describes type for request object. @param value String value of this enum
ResponseErrorReason
Describes the reason for an offline request response error.
ResponseSourceType
Describes source data type for response in resource-request event. @param value String value of this enum
Scheme
Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.
ScrollMode
Configures the directions in which the map is allowed to move during a scroll gesture.
SkyType
The type of the sky
SourceDataType
Defines what kind of source data has been loaded in a source-data-loaded event. @param finalue String finalue of this enum
StyleDataType
Defines what kind of style data has been loaded in a style-data-loaded event. @param finalue String finalue of this enum
StylePackErrorType
Describes the reason for a style package download request failure.
StyleProjectionName
StylePropertyValueKind
Describes the kind of a style property value.
SymbolPlacement
Label placement relative to its geometry.
SymbolZOrder
Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use symbol-sort-key.
TextAnchor
Part of the text placed closest to the anchor.
TextJustify
Text justification options.
TextPitchAlignment
Orientation of text when map is pitched.
TextRotationAlignment
In combination with symbol-placement, determines the rotation behavior of the individual glyphs forming the text.
TextTransform
Specifies how to capitalize text, similar to the CSS text-transform property.
TextTranslateAnchor
Controls the frame of reference for text-translate.
TextVariableAnchor
To increase the chance of placing high-priority labels on the map, you can provide an array of text-anchor locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use text-justify: auto to choose justification based on anchor position. To apply an offset, use the text-radial-offset or the two-dimensional text-offset.
TextWritingMode
The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either 'horizontal', 'vertical' or 'vertical', 'horizontal', the order doesn't affect the placement.
TileCacheBudgetType
The unit a cache budget should be measured in. Either Tiles or Megabytes.
TileDataDomain
Describes the tiles data domain.
TileRegionErrorType
Describes the reason for a tile region download request failure.
TileStoreUsageMode
Describes tile store usage modes.
Type
Type information of the variant's content
Unit
ViewAnnotationAnchor
Enum describing how to place view annotation relatively to geometry.
ViewportMode
Satisfies embedding platforms that requires the viewport coordinate systems to be set according to its standards.
Visibility
The visibility of a layer.

Extensions

Conversion on CameraState
StyleColorInt on int
Extension to convert color format
StyleColorList on List
StyleLayer on StyleManager
Extension for StyleManager to add/update/get layers from the current style.
StyleSource on StyleManager
Extension for StyleManager to add/get sources from the current style.

Constants

areaFactors → const Map<Unit, num>
Area of measurement factors based on 1 square meter.
earthRadius → const double
Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
factors → const Map<Unit, num>
Unit of measurement factors using a spherical (non-ellipsoid) earth radius. Keys are the name of the unit, values are the number of that unit in a single radian
unitsFactors → const Map<Unit, num>

Functions

bearingToAzimuth(num bearing) num
Converts any bearing angle from the north line direction (positive clockwise) and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
convertArea(num area, [dynamic originalUnit = Unit.meters, dynamic finalUnit = Unit.kilometers]) num
Converts a area to the requested unit. Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares
convertLength(num length, [Unit originalUnit = Unit.kilometers, Unit finalUnit = Unit.kilometers]) num
Converts a length to the requested unit. Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
degreesToRadians(num degrees) num
Converts an angle in degrees to radians
lengthToDegrees(num distance, [Unit unit = Unit.kilometers]) num
Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
lengthToRadians(num distance, [Unit unit = Unit.kilometers]) num
Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
radiansToDegrees(num radians) num
Converts an angle in radians to degrees
radiansToLength(num radians, [Unit unit = Unit.kilometers]) num
Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit. Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
round(num value, [num precision = 0]) num
Round number to precision
wrapResponse({Object? result, PlatformException? error, bool empty = false}) List<Object?>

Typedefs

MapCreatedCallback = void Function(MapboxMap controller)
Definition for listener invoked when the map is created.
OnCameraChangeListener = void Function(CameraChangedEventData cameraChangedEventData)
Definition for listener invoked whenever the camera position changes.
OnMapIdleListener = void Function(MapIdleEventData mapIdleEventData)
Definition for listener invoked whenever the Map has entered the idle state.
OnMapLoadedListener = void Function(MapLoadedEventData mapLoadedEventData)
Definition for listener invoked when the map loading finishes.
OnMapLoadErrorListener = void Function(MapLoadingErrorEventData mapLoadingErrorEventData)
Definition for listener invoked whenever the map load errors out.
OnMapLongTapListener = void Function(MapContentGestureContext context)
Gesture listener called on map double tap.
OnMapScrollListener = void Function(MapContentGestureContext context)
Gesture listener called on map scroll.
OnMapTapListener = void Function(MapContentGestureContext context)
Gesture listener called on map tap.
OnPlatformViewCreatedCallback = void Function(int)
OnRenderFrameFinishedListener = void Function(RenderFrameFinishedEventData renderFrameFinishedEventData)
Definition for listener invoked whenever the Map finished rendering a frame.
OnRenderFrameStartedListener = void Function(RenderFrameStartedEventData renderFrameStartedEventData)
Definition for listener invoked whenever the Map started rendering a frame.
OnResourceRequestListener = void Function(ResourceEventData resourceEventData)
Definition for listener invoked when the map makes a resource request.
OnSourceAddedListener = void Function(SourceAddedEventData sourceAddedEventData)
Definition for listener invoked whenever a source is added.
OnSourceDataLoadedListener = void Function(SourceDataLoadedEventData sourceDataLoadedEventData)
Definition for listener invoked when the requested source data has been loaded.
OnSourceRemovedListener = void Function(SourceRemovedEventData sourceRemovedEventData)
Definition for listener invoked whenever a source is removed.
OnStyleDataLoadedListener = void Function(StyleDataLoadedEventData styleDataLoadedEventData)
Definition for listener invoked when the requested style data has been loaded.
OnStyleImageMissingListener = void Function(StyleImageMissingEventData styleImageMissingEventData)
Definition for listener invoked when the style has a missing image.
OnStyleImageUnusedListener = void Function(StyleImageUnusedEventData styleImageUnusedEventData)
Definition for listener invoked when an image added to the Style is no longer needed.
OnStyleLoadedListener = void Function(StyleLoadedEventData styleLoadedEventData)
Definition for listener invoked when the style is fully loaded.