mapbox_maps_flutter library Null safety
Classes
-
ArgumentCallbacks<
T> - Mutable collection of ArgumentCallback instances, itself an ArgumentCallback.
- AttributionSettings
- Shows the attribution icon on the map.
- AttributionSettingsInterface
- 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
- 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
- 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
- Error
- The data class for error in Observer
- Event
-
Generic Event type used to notify an
observer. -
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.
- 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
- 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.
- Light
- The global light source. Check the online documentation.
- LineLayer
- A stroked line.
- LineString
- LineString, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.4
- LocationComponentSettings
- Shows a location puck on the map.
- LocationComponentSettingsInterface
- LocationIndicatorLayer
- Location Indicator layer.
- LocationPuck
- Defines what the customised look of the location puck.
- LocationPuck2D
- LocationPuck3D
- LogoSettings
- Shows the Mapbox logo on the map.
- LogoSettingsInterface
- MapAnimationOptions
- MapboxMap
- Controller for a single MapboxMap instance running on the host platform.
- MapboxStyles
- A convenience object to access the style ID strings of the professionally-designed map styles made by Mapbox.
- MapDebugOptions
- Options for enabling debugging features in a map.
- MapEvents
-
List of supported event types by the
mapandmap snapshotterobjects, and event data format specification for each event. - 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
- MapMemoryBudgetInMegabytes
- Map memory budget in megabytes.
- MapMemoryBudgetInTiles
- Map memory budget in tiles.
- MapOptions
- Describes the map option values.
- MapSnapshot
- MapSnapshotter
- 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
- OfflineRegionGeometryDefinition
-
An offline region definition is a geographic region defined by a style URL,
a geometry, zoom range, and device pixel ratio. Both
minZoomandmaxZoommust be ≥ 0, andmaxZoommust be ≥minZoom. ThemaxZoommay be ∞, in which case for each tile source, the region will include tiles fromminZoomup to the maximum zoom level provided by that source. ThepixelRatiomust be ≥ 0 and should typically be 1.0 or 2.0. - OfflineRegionManager
- OfflineRegionTilePyramidDefinition
-
An offline region definition is a geographic region defined by a style URL,
geographic bounding box, zoom range, and device pixel ratio. Both
minZoomandmaxZoommust be ≥ 0, andmaxZoommust be ≥minZoom. ThemaxZoommay be ∞, in which case for each tile source, the region will include tiles fromminZoomup to the maximum zoom level provided by that source. ThepixelRatiomust be ≥ 0 and should typically be 1.0 or 2.0. - OfflineSwitch
- OnCircleAnnotationClickListener
- OnPointAnnotationClickListener
- OnPolygonAnnotationClickListener
- OnPolylineAnnotationClickListener
- Point
- Point, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.2
- PointAnnotation
- PointAnnotationManager
- The PointAnnotationManager to add/update/delete PointAnnotationAnnotations on the map.
- PointAnnotationOptions
- Polygon
- Polygon, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.6
- 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
- QueriedFeature
-
Represents query result that is returned in QueryFeaturesCallback.
@see
queryRenderedFeaturesorquerySourceFeatures - 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
- ResourceOptions
- Options to configure a resource
- Response
- The response data class that included in EventData
- ScaleBarSettings
- Shows the scale bar on the map.
- ScaleBarSettingsInterface
- ScreenBox
-
Describes the coordinate box on the screen, measured in
platform pixelsfrom 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
mapuses screen coordinate units measured inplatform pixels. - Settings
- Size
- Size type.
- SkyLayer
- A spherical dome around the map that is always rendered behind all other layers.
- 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
- StyleObjectInfo
- The information about style object (source or layer).
- 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.
- TileID
- Defines the tile id in a source-data-loaded event.
- TilesetDescriptor
- TransitionOptions
-
The
transition optionscontrols 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-transitionproperty that defines specific transition timing for that specific layer property, overriding the global transition values. - VectorSource
- A vector tile source. @see The online documentation
Extensions
- StyleColorInt
- Extension to convert color format
- StyleColorList
- StyleLayer
- Extension for StyleManager to add/update/get layers from the current style.
- StyleLight
- Extension for StyleManager to set light in the current style.
- StyleSource
- 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.
<Unit, num>{Unit.acres : 0.000247105, Unit.centimeters : 10000, Unit.feet : 10.763910417, Unit.inches : 1550.003100006, Unit.kilometers : 0.000001, Unit.meters : 1, Unit.miles : 3.86e-7, Unit.mi… - earthRadius → const double
-
Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
6371008.8 -
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
<Unit, num>{Unit.centimeters : earthRadius * 100, Unit.degrees : earthRadius / 111325, Unit.feet : earthRadius * 3.28084, Unit.inches : earthRadius * 39.370, Unit.kilometers : earthRadius … -
unitsFactors
→ const Map<
Unit, num> -
<Unit, num>{Unit.centimeters : 100, Unit.degrees : 1 / 111325, Unit.feet : 3.28084, Unit.inches : 39.370, Unit.kilometers : 1 / 1000, Unit.meters : 1, Unit.miles : 1 / 1609.344, Unit…
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
Enums
- Anchor
- Whether extruded geometries are lit relative to the map or viewport.
- 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. - 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. @param finalue String finalue of this enum
- ModelType
- NetworkRestriction
- Classify network types based on cost.
- NorthOrientation
- Describes the map orientation.
- OfflineRegionDownloadState
- Describes the download state of a region.
- OrnamentPosition
- PuckBearingSource
- 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
- RequestPriorit
- Describes priority for request object. @param finalue String finalue of this enum
- 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.
- 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-transformproperty. - 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-anchorlocations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Usetext-justify: autoto choose justification based on anchor position. To apply an offset, use thetext-radial-offsetor the two-dimensionaltext-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. The order of elements in an array define priority order for the placement of an orientation variant.
- TileDataDomain
- Describes the tiles data domain.
- TileRegionErrorType
- Describes the reason for a tile region download request failure.
- TileStoreUsageMode
- Describes tile store usage modes.
- Type
- 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.
Typedefs
-
ArgumentCallback<
T> = void Function(T argument) - Callback function taking a single argument.
- MapCreatedCallback = void Function(MapboxMap controller)
- Definition for listener invoked when the map is created.
- Observer = void Function(Event event)
-
An
observerinterface used to subscribe for anobservableevents. */ - 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(ScreenCoordinate coordinate)
- Gesture listener called on map double tap.
- OnMapScrollListener = void Function(ScreenCoordinate coordinate)
- Gesture listener called on map scroll.
- OnMapTapListener = void Function(ScreenCoordinate coordinate)
- 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.
- 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.