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.
-
AnnotationInteractionContext
-
-
AnnotationManager
-
Factory for creating typed annotation managers.
-
AnnotationManagerPlatformInterface
-
Abstract interface for the annotation manager factory.
-
AttributionSettings
-
Shows the attribution icon on the map.
-
AttributionSettingsManager
-
Manages attribution ornament settings for the map.
-
AttributionSettingsPlatformInterface
-
Interface for attribution ornament settings.
-
BackgroundLayer
-
The background color or pattern of the map.
-
BaseAnnotationManager<T extends BaseAnnotationManagerPlatformInterface>
-
Base class for all annotation managers.
-
BaseAnnotationManagerPlatformInterface
-
Base interface for all annotation manager interfaces.
-
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
-
Data for the
cameraChanged event.
-
CameraOptions
-
Various options for describing the viewpoint of a camera. All fields are
optional.
-
CameraState
-
Describes the viewpoint of a camera.
-
CameraViewportState
-
Manually sets camera to specified properties.
-
Cancelable
-
A class representing a cancelable operation or task.
-
CanonicalTileID
-
Represents a tile coordinate.
-
CircleAnnotation
-
-
CircleAnnotationInteractionContext
-
-
CircleAnnotationManager
-
Manages circle annotations.
-
CircleAnnotationManagerPlatformInterface
-
Abstract interface for managing circle annotations.
-
CircleAnnotationOptions
-
-
CircleLayer
-
A filled circle.
-
ClipLayer
-
Layer that removes 3D content from map.
-
CompassSettings
-
Shows the compass on the map.
-
CompassSettingsManager
-
Manages compass ornament settings for the map.
-
CompassSettingsPlatformInterface
-
Interface for compass ornament settings.
-
CoordinateBounds
-
Coordinate bounds representation.
-
CoordinateBoundsZoom
-
A coordinate bounds and zoom.
-
CoordinateType
-
Coordinate types, following https://tools.ietf.org/html/rfc7946#section-4
-
CumulativeRenderingStatistics
-
-
DefaultLocationPuck2D
-
Marker subclass of LocationPuck2D that signals the platform
implementation should fall back to the default 2D puck imagery
(top / bearing / shadow) for any sprite slot the caller leaves
unset.
-
DefaultViewportTransition
-
A ViewportTransition that provides a default animation for viewport changes.
-
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
-
DurationStatistics
-
-
EasingViewportTransition
-
A ViewportTransition that animates viewport changes using an easing curve.
-
EventTimeInterval
-
The time interval of an 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.
-
FeaturesetDescriptor
-
A featureset descriptor.
-
FeaturesetFeature
-
A basic feature of a featureset.
-
FeaturesetFeatureId
-
An identifier for a feature in a featureset.
-
FeatureState
-
Wraps a FeatureState map
-
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.
-
FlyViewportTransition
-
A ViewportTransition that performs a fly animation over a specified duration.
-
FollowPuckViewportState
-
A ViewportState that configures the camera to follow the user's location indicator (puck).
-
FollowPuckViewportStateBearing
-
Specifies the different ways that FollowPuckViewportState can obtain values to use when
setting the camera's bearing.
-
FollowPuckViewportStateBearingConstant
-
Sets the camera's bearing to a constant value.
-
FollowPuckViewportStateBearingCourse
-
Sets the camera's bearing based on the device's current course (direction of movement).
-
FollowPuckViewportStateBearingHeading
-
Sets the camera's bearing based on the device's current heading.
-
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>
-
-
GesturesSettings
-
Gesture configuration allows to control the user touch interaction.
-
GesturesSettingsManager
-
Manages gesture configuration and observability for the map.
-
GesturesSettingsPlatformInterface
-
Interface for gesture configuration and observability.
-
GlyphsRasterizationOptions
-
Describes the glyphs rasterization option values.
-
GroupPerformanceStatistics
-
-
HeatmapLayer
-
A heatmap.
-
HillshadeLayer
-
Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.
-
IdleViewportState
-
Idle viewport represents the state when user freely drags the map.
-
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.
-
ImmediateViewportTransition
-
A ViewportTransition that applies the new viewport state instantly,
with no animation.
-
ImportPosition
-
Specifies the position at which an import will be added when using
Style.addImport.
-
IndoorSelectorSettings
-
Settings for the indoor floor selector.
-
IndoorSelectorSettingsManager
-
Manages indoor floor selector settings for the map.
-
IndoorSelectorSettingsPlatformInterface
-
Interface for indoor floor selector settings.
-
InfiniteCoordinateBounds
-
CoordinateBounds spanning the entire world with
infiniteBounds: true.
Pass to APIs like MapboxMap.setBounds to clear the bounds constraint.
-
Interaction
-
Base class for interactions that can be added to the map.
-
Layer
-
Base class for all style layers.
-
LayerPosition
-
Specifies position of a layer that is added via addStyleLayer method.
-
LayerSlot
-
A pre-specified location in the style where layers will be added
(e.g. on top of existing land layers but below all labels).
-
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.
-
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
-
2D location puck configuration.
-
LocationPuck3D
-
3D location puck configuration.
-
LocationSettingsManager
-
Shows a location puck on the map.
-
LocationSettingsPlatformInterface
-
Abstract interface for managing the user location indicator.
-
LogConfiguration
-
Global log-backend configuration for Mapbox SDKs.
-
LogConfigurationPlatformInterface
-
Global log-backend configuration for Mapbox SDKs.
-
LogoSettings
-
Shows the Mapbox logo on the map.
-
LogoSettingsManager
-
Manages logo ornament settings for the map.
-
LogoSettingsPlatformInterface
-
Interface for logo ornament settings.
-
LogWriterBackend
-
An interface for implementing log writing backends — e.g. for using
platform-specific log backends or logging to a notification service.
-
LongTapInteraction<T extends FeaturesetDescriptor>
-
A long tap interaction on a featureset or on the map.
-
MapAnimationOptions
-
Options for camera animations.
-
MapboxHttpService
-
Manages HTTP service configuration for the Mapbox SDK.
-
MapboxHttpServicePlatformInterface
-
Abstract interface for configuring HTTP requests made by the Mapbox SDK.
-
MapboxMap
-
User-facing controller for a Mapbox map instance.
-
MapboxMapInterface
-
Marker interface for a MapboxMap instance.
-
MapboxMapPlatformInterface
-
Abstract per-instance controller for a Mapbox map.
-
MapboxMapsFlutterPlatform
-
-
MapboxMapsOptions
-
Configurations for the external resources used by Maps API objects
(Map, Snapshotter, OfflineManager, OfflineRegionManager).
-
MapboxMapsOptionsPlatformInterface
-
Abstract interface for managing global Mapbox Maps configuration options.
-
MapboxOptions
-
A class that provides options and configurations for Mapbox services.
-
MapboxOptionsPlatformInterface
-
Abstract interface for managing the Mapbox access token.
-
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.
-
MapEvent
-
Base sealed class for all map events.
-
MapGesture
-
Common base for gesture surfaces — currently MapPanGesture,
MapZoomGesture, MapRotateGesture, MapPitchGesture — exposing
a broadcast
gestureEvents stream of MapContentGestureContexts.
-
MapIdleEventData
-
Data for the
mapIdle event.
-
MapKeyboardGesture
-
The keyboard gesture surface on a MapboxMap.
-
MapKeyboardGestureContext
-
Additional information about a keyboard-driven map gesture.
-
MapLoadedEventData
-
Data for the
mapLoaded event.
-
MapLoadingErrorEventData
-
Data for the
mapLoadingError event.
-
MapOptions
-
Describes the map option values.
-
MapPanGesture
-
The pan (drag) gesture surface on a MapboxMap.
-
MapPitchGesture
-
The pitch (tilt) gesture surface on a MapboxMap.
-
MapRecorder
-
Records and replays API calls on a map instance.
-
MapRecorderPlatformInterface
-
MapRecorder provides functions to record and replay API calls of a map instance.
-
MapRotateGesture
-
The rotate gesture surface on a MapboxMap.
-
MapSnapshotOptions
-
Set of options for taking map snapshot with
map snapshotter.
-
MapWidget
-
A widget that displays a Mapbox map using the Mapbox Maps Flutter SDK.
-
MapWidgetDebugOptions
-
Options for enabling debugging features in a map.
-
MapZoomGesture
-
The zoom gesture surface on a MapboxMap.
-
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.
-
ModelLayer
-
A 3D model
-
ModelMaterialOverride
-
Overrides a material of a 3D model.
@see The online documentation
-
ModelNodeOverride
-
Overrides a node of a 3D model.
@see The online documentation
-
ModelSource
-
A collection of 3D models
@see The online documentation
-
ModelSourceModel
-
Defines a single 3D model within a
ModelSource.
@see The online documentation
-
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
-
OfflineManager
-
The OfflineManager provides a configuration interface and entrypoint for offline map functionality.
-
OfflineManagerPlatformInterface
-
Abstract interface for managing offline style packages.
-
OfflineSwitch
-
Controls the Mapbox network stack connectivity.
-
OfflineSwitchPlatformInterface
-
Abstract interface for controlling the Mapbox network stack connectivity.
-
OverviewViewportState
-
A viewport state that configures the camera to display an overview of a specified geometry.
-
PerformanceStatistics
-
The performance statistics collected at the end of the sampling duration.
-
PerformanceStatisticsListener
-
Performance-statistics callback — users subclass and pass an instance
to
MapboxMap.startPerformanceStatisticsCollection to receive sampled
PerformanceStatistics snapshots.
-
PerformanceStatisticsOptions
-
Options for the following statistics collection behaviors:
-
PerFrameRenderingStatistics
-
-
Point
-
Point, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.2
-
PointAnnotation
-
-
PointAnnotationInteractionContext
-
-
PointAnnotationManager
-
Manages point annotations.
-
PointAnnotationManagerPlatformInterface
-
Abstract interface for managing point annotations.
-
PointAnnotationOptions
-
-
Polygon
-
Polygon, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.6
-
PolygonAnnotation
-
-
PolygonAnnotationInteractionContext
-
-
PolygonAnnotationManager
-
Manages polygon annotations.
-
PolygonAnnotationManagerPlatformInterface
-
Abstract interface for managing polygon annotations.
-
PolygonAnnotationOptions
-
-
Polyline
-
Based off of the offical Google document
Some parts from this implementation
by Mark McClure
-
PolylineAnnotation
-
-
PolylineAnnotationInteractionContext
-
-
PolylineAnnotationManager
-
Manages polyline annotations.
-
PolylineAnnotationManagerPlatformInterface
-
Abstract interface for managing polyline annotations.
-
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.
-
ProjectionPlatformInterface
-
Collection of Spherical Mercator
projection methods.
-
QueriedFeature
-
Represents query result that is returned in QueryFeaturesCallback.
-
QueriedRenderedFeature
-
Represents query result that is returned in QueryRenderedFeaturesCallback.
-
QueriedSourceFeature
-
Represents query result that is returned in QuerySourceFeaturesCallback.
-
RasterArraySource
-
A raster array source
@see The online documentation
-
RasterDataLayer
-
Description of raster data layers and the bands contained within tiles.
-
RasterDemSource
-
A RGB-encoded raster DEM source
@see The online documentation
-
RasterLayer
-
Raster map textures such as satellite imagery.
-
RasterParticleLayer
-
Particle animation driven by textures such as wind maps.
-
RasterSource
-
A raster tile source.
@see The online documentation
-
RenderedQueryGeometry
-
Geometry for querying rendered features.
-
RenderedQueryOptions
-
Options for querying rendered features.
-
RenderFrameFinishedEventData
-
Data for the
renderFrameFinished event.
-
RenderFrameStartedEventData
-
Data for the
renderFrameStarted event.
-
ResourceEventData
-
Data for the
resourceRequest event.
-
ResourceRequest
-
A resource request.
-
ResourceResponse
-
A resource response.
-
ResponseError
-
An error in a resource response.
-
ScaleBarSettings
-
Shows the scale bar on the map.
-
ScaleBarSettingsManager
-
Manages scale bar ornament settings for the map.
-
ScaleBarSettingsPlatformInterface
-
Interface for scale bar ornament settings.
-
ScreenBox
-
A rectangular area as measured in the map's coordinate system.
-
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.
-
SettingsPlatformInterface<T>
-
Generic interface for reading and updating a map settings object of type
T.
-
Size
-
Size type.
-
SkyLayer
-
A spherical dome around the map that is always rendered behind all other layers.
-
SlotLayer
-
Marks the position of a slot.
-
Snapshotter
-
Captures styled map snapshots without a live MapWidget.
-
SnapshotterPlatformInterface
-
Abstract interface for capturing styled map snapshots.
-
Source
-
Base class for all style sources.
-
SourceAddedEventData
-
Data for the
sourceAdded event.
-
SourceDataLoadedEventData
-
Data for the
sourceDataLoaded event.
-
SourceQueryOptions
-
Options for querying source features.
-
SourceRemovedEventData
-
Data for the
sourceRemoved event.
-
StandardBuildings
-
A featureset of StandardBuildings features.
-
StandardBuildingsState
-
Represents available states for StandardBuildings features in the Standard style.
-
StandardPlaceLabels
-
A featureset of StandardPlaceLabels features.
-
StandardPlaceLabelsState
-
Represents available states for StandardPlaceLabels features in the Standard style.
-
StandardPOIs
-
A featureset of StandardPOIs features.
-
StandardPOIsState
-
Represents available states for StandardPOIs features in the Standard style.
-
StyleDataLoadedEventData
-
Data for the
styleDataLoaded event.
-
StyleDefaultViewportState
-
Sets camera to the default camera options defined in the current style.
-
StyleImageMissingEventData
-
Data for the
styleImageMissing event.
-
StyleImageUnusedEventData
-
Data for the
styleImageUnused event.
-
StyleLoadedEventData
-
Data for the
styleLoaded event.
-
StyleManager
-
Manages the map's style, including layers, sources, images, and imports.
-
StyleObjectInfo
-
The information about style object (source or layer).
-
StylePack
-
The
style pack represents a stored style package.
-
StylePackLoadOptions
-
Describes the style package load option values.
-
StylePackLoadProgress
-
A
style pack load progress includes information about the number of resources
that have completed downloading and the total number of resources that are required.
-
StylePlatformInterface
-
Abstract interface for managing the map's style.
-
StyleProjection
-
The style projection.
-
StylePropertyValue
-
Holds a style property value with meta data.
-
StyleTransition
-
Defines the duration and delay for a style transition.
-
SymbolLayer
-
An icon or a text label.
-
TapInteraction<T extends FeaturesetDescriptor>
-
A single tap interaction on a featureset or on the map.
-
TileCacheBudget
-
Defines a tile-cache resource budget.
-
TileCacheBudgetInMegabytes
-
Map memory budget in megabytes.
-
TileCacheBudgetInTiles
-
Map memory budget in tiles.
-
TileCoverOptions
-
Various options needed for tile cover.
-
TileID
-
Identifies a tile by its z/x/y coordinates.
-
TileRegion
-
TileRegion represents an identifiable geographic tile region with metadata.
-
TileRegionEstimateOptions
-
Holds options for the tile region estimation operation.
-
TileRegionEstimateProgress
-
A tile region's estimate progress includes counts of the number of resources that
have been estimated and the total number of resources, as well as a partial result.
-
TileRegionEstimateResult
-
The result of tile region estimation.
-
TileRegionLoadOptions
-
Describes the tile region load option values.
-
TileRegionLoadProgress
-
A tile region's load progress includes counts of the number of resources that
have completed downloading and the total number of resources that are required.
-
TilesetDescriptorOptions
-
Describes the tileset descriptor option values.
-
TileStore
-
TileStore manages downloads and storage for requests to tile-related API endpoints, enforcing a disk usage
quota: tiles available on disk may be deleted to make room for a new download. This interface can be used by an
app developer to set the disk quota. The rest of TileStore API is intended for native SDK consumption only.
-
TileStorePlatformInterface
-
Abstract interface for managing tile store downloads.
-
TransitionOptions
-
Defines global transition options that are used when properties are changed without specific transition options.
-
TypedFeaturesetFeature<T extends FeaturesetDescriptor>
-
A FeaturesetFeature with a typed FeaturesetDescriptor. This is used to
provide typed access to the specific properties and state of a feature with
a known type such as StandardPOIs or StandardBuildings.
-
TypedInteraction<T extends TypedFeaturesetFeature<FeaturesetDescriptor>>
-
An Interaction with an action that has a typed FeaturesetFeature as input.
-
VectorSource
-
A vector tile source.
@see The online documentation
-
ViewportController
-
A controller for imperatively changing the map's viewport with animations.
-
ViewportPlatformInterface
-
Abstract interface for performing viewport transitions.
-
ViewportState
-
A base class representing different ways to position the camera on a map.
-
ViewportTransition
-
A base class for defining custom viewport transitions.
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.
-
BackgroundPitchAlignment
-
Orientation of background layer.
-
BoundaryType
-
-
CircleElevationReference
-
Selects the base of the circle-elevation-reference.
Default value: "none".
-
CirclePitchAlignment
-
Orientation of circle when map is pitched.
Default value: "viewport".
-
CirclePitchScale
-
Controls the scaling behavior of the circle when the map is pitched.
Default value: "map".
-
CircleTranslateAnchor
-
Controls the frame of reference for
circle-translate.
Default value: "map".
-
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.
-
CoordinateSystem
-
Coordinate reference systems for spatial data
-
Corner
-
-
DataSourceType
-
Describes the data source type for a resource request.
-
DistanceGeometry
-
Whether to calculate the distance based on geodesic (spheroid) or
planar (flat) method.
-
DistanceUnits
-
Supported distance unit types.
Default value: "metric".
-
Encoding
-
Encoding of raster-DEM tiles.
-
FillElevationReference
-
Selects the base of fill-elevation-reference.
Default value: "none".
-
FillExtrusionBaseAlignment
-
Controls the behavior of fill extrusion base over terrain
-
FillExtrusionHeightAlignment
-
Controls the behavior of fill extrusion height over terrain
-
FillExtrusionTranslateAnchor
-
Controls the frame of reference for
fill-extrusion-translate.
-
FillTranslateAnchor
-
Controls the frame of reference for
fill-translate.
Default value: "map".
-
GeoJSONObjectType
-
-
GestureState
-
Enumeration of gesture states.
-
GlyphsRasterizationMode
-
Describes glyphs rasterization modes.
-
Grid
-
-
HillshadeIlluminationAnchor
-
Direction of light source when map is rotated.
-
IconAnchor
-
Part of the icon placed closest to the anchor.
Default value: "center".
-
IconPitchAlignment
-
Orientation of icon when map is pitched.
Default value: "auto".
-
IconRotationAlignment
-
In combination with
symbol-placement, determines the rotation behavior of icons.
Default value: "auto".
-
IconTextFit
-
Scales the icon to fit around the associated text.
Default value: "none".
-
IconTranslateAnchor
-
Controls the frame of reference for
icon-translate.
Default value: "map".
-
LineCap
-
The display of line endings.
Default value: "butt".
-
LineElevationReference
-
Selects the base of line-elevation-reference.
Default value: "none".
-
LineJoin
-
The display of lines when joining.
Default value: "miter".
-
LineTranslateAnchor
-
Controls the frame of reference for
line-translate.
Default value: "map".
-
LineWidthUnit
-
Selects the unit of line-width. The same unit is automatically used for line-blur and line-offset. Note: This is an experimental property, and is subject to change in future versions.
Default value: "pixels".
-
LoggingLevel
-
States level of a log message.
-
MapLoadErrorType
-
Describes what resource could not be loaded.
-
MapWidgetDebugOptionsData
-
Raw Pigeon enum underlying the MapWidgetDebugOptions typed wrapper.
Exposed publicly (rather than with an underscore prefix) because the
wrapper now lives in the platform-interface package and needs to round-
trip values across package boundaries for mobile's Pigeon channels.
-
ModelElevationReference
-
Selects the base of the model.
Default value: "ground".
-
ModelScaleMode
-
Defines scaling mode. Only applies to location-indicator type layers.
Default value: "map".
-
ModelType
-
Defines rendering behavior of model in respect to other 3D scene objects.
-
NetworkRestriction
-
Classify network types based on cost.
-
NorthOrientation
-
Describes the map orientation.
-
OcclusionOpacityMode
-
Occlusion opacity mode.
Default value: "anchor".
-
OrnamentPosition
-
Defines the position of an ornament (logo, compass, scale bar, attribution) on the map.
-
PerformanceSamplerOptions
-
Samplers which can be optionally enabled to collect performance statistics.
-
PuckBearing
-
The enum controls how the puck is oriented.
Default value: "heading".
-
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.
-
RequestLoadingMethodType
-
The method used to make a resource request.
-
RequestPriority
-
The priority of a request.
-
RequestType
-
The type of a requested resource.
-
ResponseErrorReason
-
Describes the reason for an offline request response error.
Also generated in native (Swift/Kotlin) pigeon output for MapInterfaces.
-
ResponseSourceType
-
The source of a response.
-
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.
Default value: "horizontal-and-vertical".
-
SkyType
-
The type of the sky.
-
SourceDataType
-
Defines what kind of source data was loaded.
-
StyleDataType
-
Defines what kind of style data was loaded.
-
StyleProjectionName
-
The style projection name.
-
StylePropertyValueKind
-
Describes the kind of a style property value.
-
SymbolElevationReference
-
Selects the base of symbol-elevation.
Default value: "ground".
-
SymbolPlacement
-
Label placement relative to its geometry.
Default value: "point".
-
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.
Default value: "auto".
-
TextAnchor
-
Part of the text placed closest to the anchor.
Default value: "center".
-
TextJustify
-
Text justification options.
Default value: "center".
-
TextPitchAlignment
-
Orientation of text when map is pitched.
Default value: "auto".
-
TextRotationAlignment
-
In combination with
symbol-placement, determines the rotation behavior of the individual glyphs forming the text.
Default value: "auto".
-
TextTransform
-
Specifies how to capitalize text, similar to the CSS
text-transform property.
Default value: "none".
-
TextTranslateAnchor
-
Controls the frame of reference for
text-translate.
Default value: "map".
-
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 is measured in.
-
TileDataDomain
-
Describes the tiles data domain.
-
TileStoreUsageMode
-
Describes tile store usage modes.
-
Type
-
Type information of the variant's content
-
Unit
-
-
ViewportMode
-
Satisfies embedding platforms that requires the viewport coordinate systems to be set according to its standards.
-
Visibility
-
The visibility of a layer. Hand-written rather than emitted from the
style spec because
visibility is a shared layer property hard-coded
in the layer template, not visited by the per-property generator loop.
Extensions
-
AsCancelable
on StreamSubscription
-
-
Conversion
on CameraState
-
Conversions on CameraState used by callers that need to round-trip
the current camera back through APIs that take CameraOptions
(e.g.
Snapshotter.setCamera(...)).
-
FeatureCollectionMetaExtension
on FeatureCollection<GeometryObject>
-
-
FeatureCollectionOtherMembersExtension
on FeatureCollection<GeometryObject>
-
Extension to add "other members" support specifically to FeatureCollection
-
FeatureOtherMembersExtension
on Feature<GeometryObject>
-
Extension to add "other members" support specifically to Feature
-
GeoJSONObjectMetaExtension
on GeoJSONObject
-
-
GeoJSONObjectOtherMembersExtension
on GeoJSONObject
-
Extension to add "other members" support to GeoJSONObject
This follows RFC 7946 specification:
"A GeoJSON object MAY have 'other members'. Implementations
MUST NOT interpret foreign members as having any meaning unless
part of an extension or profile."
-
GeometryObjectOtherMembersExtension
on GeometryObject
-
Extension to add "other members" support specifically to GeometryObject
-
StandardBuildingsFeature
on TypedFeaturesetFeature<StandardBuildings>
-
Featureset describing the buildings.
-
StandardPlaceLabelsFeature
on TypedFeaturesetFeature<StandardPlaceLabels>
-
Points for labeling places including countries, states, cities, towns, and neighborhoods.
-
StandardPOIsFeature
on TypedFeaturesetFeature<StandardPOIs>
-
A point of interest.
-
StyleColorInt
on int
-
Converts a 32-bit ARGB Color-int to a
rgba(r, g, b, a) CSS-like string.
-
StyleColorList
on List
-
Converts a color expression list (
[rgba, r, g, b, a], [rgb, …],
[hsl, …], [hsla, …]) to a 32-bit ARGB int.
-
StyleColorString
on String
-
Convert the color from a CSS-style
"rgba(r,g,b,a)" string, as returned
for plain (non-expression) color properties like
ModelMaterialOverride.modelColor, to a 32-bit ARGB int.
Functions
-
along(Feature<LineString> line, num distance, [Unit unit = Unit.kilometers])
→ Feature<Point>
-
Takes a
line and returns a Point at a specified distance along the line.
-
applyFilter(Map? properties, dynamic filter)
→ bool
-
applyFilter
Takes a Map
properties and a filter,
Returns a bool indicating filter is applied to the properties.
-
area(GeoJSONObject geojson)
→ num?
-
Takes a GeoJSONObject and returns their area in square meters.
-
bbox(GeoJSONObject geoJson, {bool recompute = false})
→ BBox
-
Calculates the bounding box for any
geoJson object, including FeatureCollection.
If recompute is not set and the bbox is not null, the function uses the bbox of the given GeoJSONObject.
-
bboxPolygon(BBox bbox, {Map<String, dynamic> properties = const {}, dynamic id})
→ Feature<Polygon>
-
Takes a BBox and returns an equivalent Feature<Polygon>.
-
bearing(Point start, Point end, {bool calcFinal = false})
→ num
-
Takes two Points and finds the geographic bearing between them,
i.e. the angle measured in degrees from the north line (0 degrees)
For example:
-
bearingRaw(Position start, Position end, {bool calcFinal = false})
→ num
-
-
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
-
bitCode(Position p, BBox bbox)
→ int
-
-
booleanClockwise(LineString line)
→ bool
-
Takes a ring and return
true or false whether or not the ring is clockwise
or counter-clockwise.
Takes a Feature<LineString> orLineString or a List<Position> to be
evaluated.
example:
-
booleanConcave(Polygon polygon)
→ bool
-
Takes a Polygon and returns
true or false as to whether it is concave
or not.
example:
-
booleanContains(GeoJSONObject feature1, GeoJSONObject feature2)
→ bool
-
booleanContains returns
true if the second geometry is completely contained
by the first geometry.
The interiors of both geometries must intersect and, the interior and
boundary of the secondary must not intersect the exterior of the primary.
booleanContains returns the exact opposite result of the booleanWithin.
example:
-
booleanCrosses(GeoJSONObject feature1, GeoJSONObject feature2)
→ bool
-
booleanCrosses returns
true if the intersection results in a geometry whose
dimension is one less than the maximum dimension of the two source geometries
and the intersection set is interior to both source geometries.
booleanCrosses returns true for only MultiPoint/Polygon, MultiPoint/LineString,
LineString/LineString, LineString/Polygon, and LineString/MultiPolygon comparisons.
Other comparisons are not supported as they are outside the OpenGIS Simple
Features spec and may give unexpected results.
example:
-
booleanDisjoint(GeoJSONObject feature1, GeoJSONObject feature2, {bool ignoreSelfIntersections = false})
→ bool
-
Returns
true if the intersection of the two geometries is an empty set.
example:
-
booleanEqual(GeoJSONObject feature1, GeoJSONObject feature2, {int precision = 6, bool direction = false, bool shiftedPolygon = false})
→ bool
-
Determine whether two geometries of the same type have identical X,Y coordinate values.
See http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm
precision=6 sets decimal precision to use when comparing coordinates.
With direction set to true, even if the LineStrings are reverse versions
of each other but they have similar Positions, they will be considered the
same. If shiftedPolygon is true, two Polygons with shifted Positions
are considered the same.
Returns true if the objects are equal, false otherwise
example:
-
booleanIntersects(GeoJSONObject feature1, GeoJSONObject feature2, {bool ignoreSelfIntersections = true})
→ bool
-
Returns
true when two geometries intersect.
Takes feature1 & feature2 parameters of type GeoJSONObject which can be
a Feature or GeometryType.
example
-
booleanOverlap(Feature<GeometryObject> firstFeature, Feature<GeometryObject> secondFeature)
→ bool
-
Takes two geometries
firstFeature and secondFeature and checks if they
share an common area but are not completely contained by each other.
-
booleanParallel(LineString line1, LineString line2)
→ bool
-
Returns
true if each segment of line1 is parallel to the correspondent
segment of line2
example:
-
booleanPointInPolygon(Position point, GeoJSONObject polygon, {bool ignoreBoundary = false})
→ bool
-
Takes a Point, and a Polygon or MultiPolygonand determines if the
Point resides within the Polygon. The Polygon can be convex or concave.
The function accounts for holes. By taking a Feature<Polygon> or a
Feature<MultiPolygon>. The
ignoreBoundary flag (default false) should be
set to true if the Polygon's boundary should be ignored when determining if
the Point is inside the Polygon, otherwise false.
example:
-
booleanPointOnLine(Point pt, LineString line, {bool ignoreEndVertices = false, num? epsilon})
→ bool
-
Returns
true if a point is on a line. Accepts an optional parameter to ignore the
start and end vertices of the LineString.
The ignoreEndVertices flag (default false) controls whether to ignore the start
and end vertices.
epsilon is the fractional number to compare with the cross product result.
It's useful for dealing with floating points in lng/lat.
-
booleanTouches(GeoJSONObject feature1, GeoJSONObject feature2)
→ bool
-
Boolean-touches returns
true if none of the Points common to both geometries
intersect the interiors of both geometries.
example
-
booleanValid(GeoJSONObject feature)
→ bool
-
booleanValid checks if the geometry is a valid according to the OGC Simple
Feature Specification.
Take a Feature or a GeometryType
example
-
booleanWithin(GeoJSONObject feature1, GeoJSONObject feature2)
→ bool
-
Returns
true if the first GeoJSONObject is completely within the second GeoJSONObject.
The interiors of both geometries must intersect and, the interior and boundary
of the primary (geometry a) must not intersect the exterior of the secondary
(geometry b). booleanWithin returns the exact opposite result of booleanContains.
-
calculateFinalBearing(Point start, Point end)
→ num
-
Calculates Final Bearing
-
calculateFinalBearingRaw(Position start, Position end)
→ num
-
-
calculateRhumbBearing(Position from, Position to)
→ num
-
Returns the bearing from ‘this’ Point to destination Point along a rhumb line.
Adapted from Geodesy: https://github.com/chrisveness/geodesy/blob/master/latlon-spherical.js
Returns Bearing in degrees from north.
example
-
calculateRhumbDestination(Position origin, num distance, num bearing, [num radius = earthRadius])
→ Position
-
-
calculateRhumbDistance(Position origin, Position destination, [num radius = earthRadius])
→ num
-
Returns the distance traveling from ‘this’ point to destination point along a rhumb line.
Adapted from Geodesy ‘distanceTo‘: https://github.com/chrisveness/geodesy/blob/master/latlon-spherical.js
-
center(GeoJSONObject geoJSON, {dynamic id, BBox? bbox, Map<String, dynamic>? properties})
→ Feature<Point>
-
Takes a Feature or a FeatureCollection and returns the absolute center point of all feature(s).
-
centroid(GeoJSONObject geoJSON, {Map<String, dynamic>? properties})
→ Feature<Point>
-
Takes a Feature or a FeatureCollection and computes the centroid as
the mean of all vertices within the object.
-
cleanCoords(GeoJSONObject geojson, {bool mutate = false})
→ Feature<GeometryObject>
-
Removes redundant coordinates from any GeometryType.
Takes a Feature or GeometryType
mutate allows GeoJSON input to be mutated
Returns the cleaned input Feature
example:
-
clusterEach(FeatureCollection<GeometryObject> geojson, dynamic property, ClusterEachCallback callback)
→ void
-
clusterEach
Takes a FeatureCollection, a dynamic
property key/value used to create clusters,
and a ClusterEachCallback method that takes (cluster, clusterValue, currentIndex) and
Returns void.
For example:
-
clusterReduce<T>(FeatureCollection<GeometryObject> geojson, dynamic property, ClusterReduceCallback<T> callback, dynamic initialValue)
→ T?
-
Reduces clusters in Features, similar to Iterable.reduce
Takes a FeatureCollection
geojson, a dynamic property, a GeoJSONObject's property key/value
used to create clusters, a ClusterReduceCallback method, and an initialValue to
use as the first argument to the first call of the callback.
Returns the value that results from the reduction.
For example:
-
combine(FeatureCollection<GeometryObject> collection)
→ FeatureCollection<GeometryObject>
-
Combines a FeatureCollection of Point, LineString, or Polygon features
(and their Multi* counterparts) into MultiPoint, MultiLineString, or
MultiPolygon features.
-
convertArea(num area, [dynamic originalUnit = Unit.meters, dynamic finalUnit = Unit.kilometers])
→ num
-
Converts a area to the requested unit.
Valid units: Unit.kilometers, Unit.meters, Unit.centimeters, Unit.millimeters, Unit.acres,
Unit.miles, Unit.yards, Unit.feet, Unit.inches
-
convertCoordinates(Position coord, CoordinateSystem fromSystem, CoordinateSystem toSystem)
→ Position
-
Converts coordinates from one system to another.
-
convertLength(num length, [Unit originalUnit = Unit.kilometers, Unit finalUnit = Unit.kilometers])
→ num
-
Converts a length to the requested unit.
Valid units: Unit.miles, Unit.nauticalmiles, Unit.inches, Unit.yards, Unit.meters,
Unit.kilometers, Unit.centimeters, Unit.feet
-
coordAll(GeoJSONObject geojson)
→ List<Position?>
-
Gets all coordinates from any GeoJSONObject.
Receives any GeoJSONObject
Returns List<Position>
For example:
-
coordEach(GeoJSONObject geoJSON, Function callback, [bool excludeWrapCoord = false])
→ void
-
Iterates over coordinates in any
geoJSONObject, similar to Iterable.forEach
example:
-
coordReduce<T>(GeoJSONObject geojson, CoordReduceCallback<T> callback, T? initialValue, [bool excludeWrapCoord = false])
→ T?
-
Reduces coordinates in any GeoJSONObject, similar to Iterable.reduce
-
createBins(FeatureCollection<GeometryObject> geojson, dynamic property)
→ Map<dynamic, List<int>>
-
createBins
Takes a FeatureCollection geojson, and dynamic
property key whose
corresponding values of the Features will be used to create bins.
Returns Map<String, List> bins with Feature IDs
For example
-
degreesToRadians(num degrees)
→ num
-
Converts an angle in degrees to radians
-
destination(Point origin, num distance, num bearing, [Unit unit = Unit.kilometers])
→ Point
-
Takes a Point and calculates the location of a destination point given a distance in
degrees, radians, miles, or kilometers; and bearing in degrees.
This uses the Haversine formula to account for global curvature.
For example:
-
destinationRaw(Position origin, num distance, num bearing, [Unit unit = Unit.kilometers])
→ Position
-
-
distance(Point from, Point to, [Unit unit = Unit.kilometers])
→ num
-
Calculates the distance between two Points in degrees, radians, miles, or kilometers.
This uses the Haversine formula to account for global curvature.
For example:
-
distanceRaw(Position from, Position to, [Unit unit = Unit.kilometers])
→ num
-
-
envelope(GeoJSONObject geojson)
→ Feature<Polygon>
-
Returns a rectangular Polygon (envelope) that fully contains the given GeoJSON object.
-
explode(GeoJSONObject geojson)
→ FeatureCollection<Point>
-
Takes a feature or set of features and returns all positions as Points.
Takes GeoJSONObject input.
Returns FeatureCollection<point> representing the exploded input features
Throws Exception if it encounters an unknown geometry type
-
Utility to extract "other members" from GeoJSON objects
according to RFC 7946 specification.
-
featureEach(GeoJSONObject geoJSON, FeatureEachCallback callback)
→ void
-
Iterates over features in any
geoJSONObject, calling callback on each
iteration. Similar to Iterable.forEach.
For example:
-
featureReduce<T>(GeoJSONObject geojson, FeatureReduceCallback<T> callback, T? initialValue)
→ T?
-
Reduces features in any GeoJSONObject, similar to Iterable.reduce.
-
filterProperties(Map<String, dynamic> properties, List<String>? keys)
→ Map<String, dynamic>
-
filterProperties
Takes Map<String, dynamic>
properties, and List<String> keys used to
filter Properties.
Returns Map<String, dynamic> filtered Properties
For example:
-
flatten(GeoJSONObject geojson)
→ FeatureCollection<GeometryObject>
-
Takes any GeoJSONObject and returns a FeatureCollection of simple features.
The function flattens all Multi* geometries into single-geometry Features.
-
flattenEach(GeoJSONObject geoJSON, FlattenEachCallback callback)
→ void
-
Iterates over flattened features in any
geoJSONObject, similar to
Iterable.forEach, calling callback on each flattened feature
-
flattenReduce<T>(GeoJSONObject geojson, FlattenReduceCallback<T> callback, T? initialValue)
→ T?
-
Reduces flattened features in any GeoJSONObject, similar to Iterable.reduce.
Takes a FeatureCollection, Feature, or GeometryType
a FlattenReduceCallback method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex),
an
initialValue Value to use as the first argument to the first call of the callback.
Returns the value that results from the reduction.
For example:
-
geomEach(GeoJSONObject geoJSON, GeomEachCallback callback)
→ void
-
Iterates over each geometry in
geoJSON, calling callback on each
iteration. Similar to Iterable.forEach
-
geomReduce<T>(GeoJSONObject geoJSON, GeomReduceCallback<T> callback, T? initialValue)
→ T?
-
Reduces geometry in any GeoJSONObject, similar to Iterable.reduce.
-
geoToMercator(GeoJSONObject geojson, {bool mutate = false})
→ GeoJSONObject
-
Converts a WGS84 GeoJSON object into Web Mercator (EPSG:3857 / 900913)
projection.
-
geoToWgs84(GeoJSONObject geojson, {bool mutate = false})
→ GeoJSONObject
-
Converts a Web Mercator (EPSG:3857 / 900913) GeoJSON object back into
WGS84 projection.
-
getCluster(FeatureCollection<GeometryObject> geojson, dynamic filter)
→ FeatureCollection<GeometryObject>
-
Get Cluster
Takes a FeatureCollection<Feature> and a
dynamic filter used on GeoJSON properties
to get Cluster.
Returns a FeatureCollection single cluster filtered by GeoJSON Properties
For example:
-
getCoord(dynamic coord)
→ Position
-
Unwraps a coordinate from a Point, Feature<Point>, and a Position.
-
getCoords(dynamic coords)
→ List
-
Unwraps coordinates from a Feature, GeometryObject or a List
Gets a List<dynamic>, GeometryObject or a Feature or a List<dynamic> and
returns List<dynamic>.
For example:
-
getGeom(GeoJSONObject geojson)
→ GeometryObject
-
Get Geometry or Geometries from Feature or GeometryCollection
Returns List<GeometryType> in case geojson is a GeometryCollection and a
GeometryType if geojson is a simple GeometryType.
example:
-
intersect(Position a, Position b, int edge, BBox bbox)
→ Position
-
-
isAbove(Position p1, Position p2, Position p3)
→ bool
-
Returns true if
p3 is above the line from p1 to p2.
-
isBelow(Position p1, Position p2, Position p3)
→ bool
-
Returns true if
p3 is below the line from p1 to p2.
-
isLeft(Position p1, Position p2, Position p3)
→ num
-
Returns a positive value if
p3 is to the left of the line from p1 to p2,
negative if to the right, and 0 if collinear.
-
isPointOnLineEnd(Point point, LineString line)
→ bool
-
-
isPointOnLineSegmentCleanCoordsVariant(Position start, Position end, Position point)
→ bool
-
Returns if
point is on the segment between start and end.
Borrowed from booleanPointOnLine to speed up the evaluation (instead of
using the module as dependency).
start is the coord pair of start of line, end is the coord pair of end
of line, and point is the coord pair of point to check.
-
isPointOnLineSegmentCrossesVariant(Position start, Position end, Position pt, bool incEnd)
→ bool
-
Only takes into account outer rings
See http://stackoverflow.com/a/4833823/1979085
lineSegmentStart Position of start of line
lineSegmentEnd Position of end of line
pt Position of point to check
incEnd controls whether the Point is allowed to fall on the line ends
-
length(Feature<LineString> line, [Unit unit = Unit.kilometers])
→ num
-
Takes a
line and measures its length in the specified unit.
-
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: Unit.miles, Unit.nauticalmiles, Unit.inches, Unit.yards, Unit.meters,
Unit.centimeters, Unit.kilometers, Unit.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: Unit.miles, Unit.nauticalmiles, Unit.inches, Unit.yards, Unit.meters,
Unit.kilometers, Unit.centimeters, Unit.feet
-
lineclip(List<Position> points, BBox bbox, [List<List<Position>>? result])
→ List<List<Position>>
-
-
lineIntersect(GeoJSONObject line1, GeoJSONObject line2, {bool removeDuplicates = true, bool ignoreSelfIntersections = false})
→ FeatureCollection<Point>
-
Takes any LineString or Polygon and returns the intersecting Point.
removeDuplicates (default true) removes duplicate intersections,
ignoreSelfIntersections (default false) ignores self-intersections on input features
Returns a FeatureCollection<Point> containing point(s) that intersect both
example:
-
lineOverlap(Feature<GeometryObject> feature1, Feature<GeometryObject> feature2, {num tolerance = 0, Unit unit = Unit.kilometers})
→ FeatureCollection<LineString>
-
Takes any LineString, MultiLineString, Polygon or MultiPolygon and
returns the overlapping lines between both features.
feature1 first feature
feature2 second feature
tolerance tolerance distance to match overlapping line segments, default is 0
unit the unit in which the tolerance is expressed, default is kilometers
returns FeatureCollection<LineString> lines(s) that are overlapping between both features
-
lineSegment(GeoJSONObject geoJson, {bool combineGeometries = false})
→ FeatureCollection<LineString>
-
Creates a FeatureCollection of 2-vertex LineString segments from a
LineString or MultiLineString or Polygon and MultiPolygon
Returns FeatureCollection<LineString> 2-vertex line segments
For example:
-
lineSlice(Feature<Point> startPt, Feature<Point> stopPt, Feature<LineString> line)
→ Feature<LineString>
-
Takes a
line, at a start point startPt, and a stop point stopPt
and returns a subsection of the line in-between those points.
The start & stop points don't need to fall exactly on the line.
-
lineSliceAlong(Feature<LineString> line, double startDist, double stopDist, [Unit unit = Unit.kilometers])
→ Feature<LineString>
-
Takes a
line, at a start distance startDist and a stop distance stopDist
and returns a subsection of the line in-between those distances.
-
lineSliceAlongRaw(LineString line, double startDist, double stopDist, [Unit unit = Unit.kilometers])
→ LineString
-
Takes a
line, at a start distance startDist and a stop distance stopDist
and returns a subsection of the line in-between those distances.
-
lineStringToPolygon(GeoJSONObject line, bool autoComplete, bool orderCoords, {Map<String, dynamic>? properties})
→ Feature<Polygon>
-
Converts LineString to Polygon
Takes a optional boolean
autoComplete that auto completes LineStrings
Takes an optional orderCoords that sorts LineStrings to place outer
ring at the first Position of the coordinates.
-
lineToPolygon(GeoJSONObject lines, {Map<String, dynamic>? properties, bool autoComplete = true, bool orderCoords = true, bool mutate = false})
→ Feature<GeometryObject>
-
Converts LineStrings & MultiLineString to Polygon or MultiPolygon.
Takes an optional boolean
autoComplete that auto completes LineStrings
(matches first & last coordinates).
Takes an optional orderCoords that sorts LineStrings to place outer ring
at the first Position of the coordinates.
Takes an optional mutate that mutates the original LineString using
autoComplete (matches first & last coordinates.
Returns Feature<Polygon> or Feature<MultiPolygon> converted to Polygons.
example:
-
midpoint(Point point1, Point point2)
→ Point
-
Takes two Points and returns a point midway between them.
The midpoint is calculated geodesically, meaning the curvature of the
earth is taken into account.
For example:
-
midpointRaw(Position point1, Position point2)
→ Position
-
-
nearestPoint(Feature<Point> targetPoint, FeatureCollection<Point> points)
→ Feature<Point>
-
Takes a reference Point and a FeatureCollection of Features
with Point geometries and returns the
point from the FeatureCollection closest to the reference. This calculation
is geodesic. For example:
-
nearestPointOnLine(LineString line, Point point, [Unit unit = Unit.kilometers])
→ Feature<Point>
-
Takes a Point and a LineString and calculates the closest Point on the LineString.
-
nearestPointOnMultiLine(MultiLineString lines, Point point, [Unit unit = Unit.kilometers])
→ Feature<Point>?
-
Takes a Point and a MultiLineString and calculates the closest Point on the MultiLineString.
-
pointOnFeature(dynamic featureInput)
→ Feature<Point>
-
Returns a Feature<Point> that represents a point guaranteed to be on the feature.
-
pointToLineDistance(Point point, LineString line, {Unit unit = Unit.kilometers, DistanceGeometry method = DistanceGeometry.geodesic})
→ num
-
Returns the minimum distance between a
point and a line, being the
distance from a line the minimum distance between the point and any
segment of the LineString.
-
polygonclip(List<Position> points, BBox bbox)
→ List<Position>
-
-
polygonSmooth(GeoJSONObject inputPolys, {int iterations = 1})
→ FeatureCollection<GeometryObject>
-
Smooths a Polygon, MultiPolygon, also inside Features, FeatureCollections, or GeometryCollection. Based on Chaikin's algorithm.
Warning: may create degenerate polygons.
The optional parameter
iterations is the number of times to smooth the polygon. A higher value means a smoother polygon.
The functions returns a FeatureCollection of Polygons and MultiPolygons.
-
polygonTangents(Point point, GeoJSONObject inputPolys)
→ FeatureCollection<Point>
-
Finds the tangents of a Polygon or MultiPolygon from a Point.
-
polygonToLine(GeoJSONObject poly, {Map<String, dynamic>? properties})
→ GeoJSONObject
-
Converts a Polygon to LineString or MultiLineString or a MultiPolygon
to a FeatureCollection of LineString or MultiLineString.
Returns FeatureCollection or Feature<LineString> or Feature<MultiLinestring>
example:
-
processPolygon(List<Position> polygonCoords, Position pointCoords, double eprev, Position rtan, Position ltan)
→ List<Position>
-
Processes a polygon to determine the right and left tangents.
-
propEach(GeoJSONObject geoJSON, PropEachCallback callback)
→ void
-
Iterates over properties in any
geoJSON object, calling callback on each
iteration. Similar to Iterable.forEach
-
propertiesContainsFilter(Map properties, Map filter)
→ bool
-
Properties contains filter (does not apply deepEqual operations)
Takes a Map
properties value, and a Map filter and
Returns bool if filter does equal the properties
For example
-
propReduce<T>(GeoJSONObject geojson, PropReduceCallback<T> callback, T? initialValue)
→ T?
-
Reduces properties in any GeoJSONObject into a single value,
similar to how Iterable.reduce works. However, in this case we lazily run
the reduction, so List of all properties is unnecessary.
-
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: Unit.miles, Unit.nauticalmiles, Unit.inches, Unit.yards, Unit.meters,
Unit.kilometers, Unit.centimeters, Unit.feet
-
rhumbBearing(Point start, Point end, {bool kFinal = false})
→ num
-
Takes two Point and finds the bearing angle between them along a Rhumb line
i.e. the angle measured in degrees start the north line (0 degrees)
kFinal calculates the final bearing if true.
Returns bearing from north in decimal degrees, between -180 and 180 degrees (positive clockwise)
example:
-
rhumbDestination(Point origin, num distance, num bearing, {Unit? unit = Unit.kilometers, Map<String, dynamic>? properties})
→ Feature<Point>
-
Returns the destination Point having traveled the given distance along a Rhumb line from the
origin Point with the (variant) given bearing.
-
rhumbDistance(Point from, Point to, [Unit unit = Unit.kilometers])
→ num
-
Calculates the distance along a rhumb line between two Point in degrees, radians,
miles, or kilometers.
-
round(num value, [num precision = 0])
→ num
-
Round number to precision
-
segmentEach(GeoJSONObject geojson, SegmentEachCallback callback, {bool combineNestedGeometries = true})
→ void
-
Iterates over 2-vertex line segment in any GeoJSON object, similar to Iterable.forEach
(Multi)Point geometries do not contain segments therefore they are ignored during this operation.
-
segmentReduce<T>(GeoJSONObject geojson, SegmentReduceCallback<T> callback, T? initialValue, {bool combineNestedGeometries = true})
→ T?
-
Reduces 2-vertex line segment in any GeoJSON object, similar to Iterable.reduce
(Multi)Point geometries do not contain segments therefore they are ignored during this operation.
-
square(BBox bbox)
→ BBox
-
Takes a BBox and returns a square BBox of equal dimensions.
-
toMercator(Position coord)
→ Position
-
Converts a WGS84 coordinate to Web Mercator.
-
toWGS84(Position coord)
→ Position
-
Converts a Web Mercator coordinate to WGS84.
-
transformRotate(GeoJSONObject geoJSON, num angle, {Point? pivot, bool mutate = false})
→ GeoJSONObject
-
Rotates any GeoJSONObject of a specified angle, around its
centroid or a given pivot Point.
-
truncate(GeoJSONObject geojson, {int precision = 6, int coordinates = 3, bool mutate = false})
→ GeoJSONObject
-
Takes a Feature or FeatureCollection and truncates the precision of the geometry.
precision sets the coordinate decimal precision
coordinates sets the maximum number of coordinates (primarly used to remove z coordinates)
mutate allows GeoJSONObject input to be mutated (significant performance increase if true)
Returns GeoJSONObject layer with truncated geometry
Typedefs
-
AttributionSettingsInterface
= AttributionSettingsManager
-
Deprecated: Use AttributionSettingsManager instead.
-
ClusterEachCallback
= dynamic Function(FeatureCollection<GeometryObject>? cluster, dynamic clusterValue, int? currentIndex)
-
ClusterEachCallback
Takes a FeatureCollection, the cluster being processed, a
clusterValue
used to create cluster being processed, and the currentIndex, the index of
current element being processed in the List. Starts at index 0
Returns void.
-
ClusterReduceCallback<T>
= T? Function(T? previousValue, FeatureCollection<GeometryObject>? cluster, dynamic clusterValue, int? currentIndex)
-
ClusterReduceCallback
The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an
initialValue argument.
-
CompassSettingsInterface
= CompassSettingsManager
-
Deprecated: Use CompassSettingsManager instead.
-
CoordEachCallback
= dynamic Function(Position? currentCoord, int? coordIndex, int? featureIndex, int? multiFeatureIndex, int? geometryIndex)
-
-
CoordReduceCallback<T>
= T? Function(T? previousValue, Position? currentCoord, int? coordIndex, int? featureIndex, int? multiFeatureIndex, int? geometryIndex)
-
Callback for coordReduce
-
FeatureEachCallback
= dynamic Function(Feature<GeometryObject> currentFeature, int featureIndex)
-
Callback for featureEach
-
FeatureReduceCallback<T>
= T? Function(T? previousValue, Feature<GeometryObject> currentFeature, int featureIndex)
-
Callback for featureReduce
-
FlattenEachCallback
= dynamic Function(Feature<GeometryType> currentFeature, int featureIndex, int multiFeatureIndex)
-
Callback for flattenEach
-
FlattenReduceCallback<T>
= T? Function(T? previousValue, Feature<GeometryObject> currentFeature, int featureIndex, int multiFeatureIndex)
-
Callback for flattenReduce
The first time the callback function is called, the values provided as
arguments depend on whether the reduce method has an
initialValue argument.
If an initialValue is provided to the reduce method:
-
GeomEachCallback
= dynamic Function(GeometryType? currentGeometry, int? featureIndex, Map<String, dynamic>? featureProperties, BBox? featureBBox, dynamic featureId)
-
-
GeomReduceCallback<T>
= T? Function(T? previousValue, GeometryType? currentGeometry, int? featureIndex, Map<String, dynamic>? featureProperties, BBox? featureBBox, dynamic featureId)
-
Callback for geomReduce
-
GesturesSettingsInterface
= GesturesSettingsManager
-
Deprecated: Use GesturesSettingsManager instead.
-
IndoorSelectorSettingsInterface
= IndoorSelectorSettingsManager
-
Deprecated: Use IndoorSelectorSettingsManager instead.
-
LocalizedCoordEachCallback
= dynamic Function(Position? currentCoord, int? coordIndex, int? featureIndex, int? multiFeatureIndex, int? geometryIndex, int? localCoordIndex)
-
-
LocationSettings
= LocationSettingsManager
-
Deprecated: Use LocationSettingsManager instead.
-
LogoSettingsInterface
= LogoSettingsManager
-
Deprecated: Use LogoSettingsManager instead.
-
MapboxMapCreatedCallback<T extends MapboxMapInterface>
= void Function(T mapboxMap)
-
Callback signature invoked when a map instance is ready.
-
MapCreatedCallback
= MapboxMapCreatedCallback<MapboxMap>
-
-
OnCameraChangeListener
= void Function(CameraChangedEventData cameraChangedEventData)
-
Invoked whenever the camera position changes.
-
OnInteraction<T extends FeaturesetFeature>
= void Function(T? feature, MapContentGestureContext context)
-
Interaction callback for any feature type.
-
OnInteractionContext
= void Function(MapContentGestureContext context)
-
Interaction callback that just returns the MapContentGestureContext.
-
OnInteractionFeatureContext<T extends FeaturesetFeature>
= void Function(T feature, MapContentGestureContext context)
-
Interaction callback for a specific featureset which returns a non-optional FeaturesetFeature.
-
OnMapIdleListener
= void Function(MapIdleEventData mapIdleEventData)
-
Invoked whenever the map has entered the idle state.
-
OnMapLoadedListener
= void Function(MapLoadedEventData mapLoadedEventData)
-
Invoked when map loading finishes.
-
OnMapLoadErrorListener
= void Function(MapLoadingErrorEventData mapLoadingErrorEventData)
-
Invoked whenever the map load errors out.
-
OnMapScrollListener
= void Function(MapContentGestureContext context)
-
Gesture listener called on map scroll.
-
OnMapZoomListener
= void Function(MapContentGestureContext context)
-
Gesture listener called on map zoom.
-
OnRenderFrameFinishedListener
= void Function(RenderFrameFinishedEventData renderFrameFinishedEventData)
-
Invoked whenever the map finished rendering a frame.
-
OnRenderFrameStartedListener
= void Function(RenderFrameStartedEventData renderFrameStartedEventData)
-
Invoked whenever the map started rendering a frame.
-
OnResourceRequestListener
= void Function(ResourceEventData resourceEventData)
-
Invoked when the map makes a resource request.
-
OnSourceAddedListener
= void Function(SourceAddedEventData sourceAddedEventData)
-
Invoked whenever a source is added.
-
OnSourceDataLoadedListener
= void Function(SourceDataLoadedEventData sourceDataLoadedEventData)
-
Invoked when the requested source data has been loaded.
-
OnSourceRemovedListener
= void Function(SourceRemovedEventData sourceRemovedEventData)
-
Invoked whenever a source is removed.
-
OnStyleDataLoadedListener
= void Function(StyleDataLoadedEventData styleDataLoadedEventData)
-
Invoked when the requested style data has been loaded.
-
OnStyleImageMissingListener
= void Function(StyleImageMissingEventData styleImageMissingEventData)
-
Invoked when the style has a missing image.
-
OnStyleImageUnusedListener
= void Function(StyleImageUnusedEventData styleImageUnusedEventData)
-
Invoked when an image added to the style is no longer needed.
-
OnStyleLoadedListener
= void Function(StyleLoadedEventData styleLoadedEventData)
-
Invoked when the style is fully loaded.
-
OnStylePackLoadProgressListener
= void Function(StylePackLoadProgress progress)
-
StylePack load progress callback.
-
OnTileRegionEstimateProgressListener
= void Function(TileRegionEstimateProgress progress)
-
TileRegion estimate progress callback.
-
OnTileRegionLoadProgressListener
= void Function(TileRegionLoadProgress progress)
-
TileRegion load progress callback.
-
PlatformMapCreatedCallback
= MapboxMapCreatedCallback<MapboxMapPlatformInterface>
-
-
PropEachCallback
= dynamic Function(Map<String, dynamic>? currentProperties, int featureIndex)
-
Callback for propEach
-
PropReduceCallback<T>
= T? Function(T? previousValue, Map<String, dynamic>? currentProperties, int featureIndex)
-
Callback for propReduce
-
ScaleBarSettingsInterface
= ScaleBarSettingsManager
-
Deprecated: Use ScaleBarSettingsManager instead.
-
SegmentEachCallback
= dynamic Function(Feature<LineString> currentSegment, int featureIndex, int? multiFeatureIndex, int? geometryIndex, int segmentIndex)
-
SegmentEachCallback
-
SegmentReduceCallback<T>
= T? Function(T? previousValue, Feature<LineString> currentSegment, T? initialValue, int featureIndex, int? multiFeatureIndex, int? geometryIndex, int segmentIndex)
-
Callback for segmentReduce