flutter_map library

flutter_map

A versatile mapping package for Flutter. Simple and easy to learn, yet completely customizable and configurable, it's the best choice for mapping in your Flutter app.



Classes

AssetTileProvider
Fetch tiles from the app's shipped assets, where the tile URL is a path within the asset store
BaseOverlayImage
Base class for all overlay images.
Bounds<T extends num>
Rectangular bound delimited by orthogonal lines passing through two points.
CameraConstraint
Describes a boundary for a MapCamera, that cannot be exceeded by movement
CameraFit
Describes a position for a MapCamera
CenterZoom
Geographical point with applied zoom level
CircleLayer
CircleMarker
Immutable marker options for circle markers
CirclePainter
ContainCamera
Constrains the edges of the camera to within bounds
ContainCameraCenter
Constrains the center coordinate of the camera to within bounds
Crs
An abstract representation of a Coordinate Reference System.
CrsSimple
CursorKeyboardRotationOptions
Options to configure cursor/keyboard rotation
Earth
Epsg3857
The most common CRS used for rendering maps.
Epsg4326
A common CRS among GIS enthusiasts. Uses simple Equirectangular projection.
FadeInTileDisplay
FadeRAWA
Prebuilt animation provider for a RichAttributionWidget
FileTileProvider
Fetch tiles from the local filesystem (not asset store), where the tile URL is a path within the filesystem.
FitBounds
FitBoundsOptions
FitCoordinates
FitInsideBounds
FlutterMap
An interactive geographical map
InstantaneousTileDisplay
InteractionOptions
InteractiveFlag
Use InteractiveFlag to disable / enable certain events Use InteractiveFlag.all to enable all events, use InteractiveFlag.none to disable all events
LatLngBounds
Data structure representing rectangular bounding box constrained by its northwest and southeast corners
LatLngTween
LogoSourceAttribution
An image attribution permanently displayed adjacent to the open/close icon of a RichAttributionWidget
MapCamera
Describes the view of a map. This includes the size/zoom/position/crs as well as the minimum/maximum zoom. This class is mostly immutable but has some fields that get calculated lazily, changes to the map view may occur via the MapController or user interactions which will result in a new MapCamera value.
MapController
Controller to programmatically interact with FlutterMap, such as controlling it and accessing some of its properties.
MapControllerImpl
Implements MapController whilst exposing methods for internal use which should not be visible to the user (e.g. for setting the current camera or linking the internal controller).
MapEvent
Base event class which is emitted by MapController instance, the event is usually related to performed gesture on the map itself or it can be an event related to map configuration
MapEventDoubleTapZoom
Event which is fired when map is double tapped
MapEventDoubleTapZoomEnd
Event which is fired when animation for double tap gesture ends
MapEventDoubleTapZoomStart
Event which is fired when animation for double tap gesture is started
MapEventFlingAnimation
Event which is fired when animation started by fling gesture is in progress
MapEventFlingAnimationEnd
Event which is fired when animation started by fling gesture finished
MapEventFlingAnimationNotStarted
Emits when InteractiveFlags contains fling and there wasn't enough velocity to start fling animation
MapEventFlingAnimationStart
Event which is fired when fling gesture is detected
MapEventLongPress
Event which is fired when map is long-pressed
MapEventMove
Event which is fired when map is being moved.
MapEventMoveEnd
Event which is fired when dragging is finished
MapEventMoveStart
Event which is fired when dragging is started
MapEventNonRotatedSizeChange
MapEventRotate
Event which is fired when map is being rotated
MapEventRotateEnd
Event which is fired when rotate gesture has ended
MapEventRotateStart
Event which is fired when rotate gesture was started
MapEventScrollWheelZoom
Event which is fired when scroll wheel is used to zoom
MapEventSecondaryTap
MapEventTap
Event which is fired when map is tapped
MapEventWithMove
Base event class which is emitted by MapController instance and includes information about camera movement which are not partial (e.g start rotate, rotate, end rotate).
MapOptions
MapPosition
Marker
A container for a child widget located at a geographic coordinate point
MarkerLayer
MobileLayerTransformer
Transforms a child widget tree into a layer that can move and rotate based on the MapCamera
MultiFingerGesture
Use MultiFingerGesture to disable / enable certain gestures Use MultiFingerGesture.all to enable all gestures, use MultiFingerGesture.none to disable all gestures
NetworkTileProvider
TileProvider to fetch tiles from the network
OverlayImage
Unrotated overlay image that spans between a given bounding box.
OverlayImageLayer
Polygon
PolygonLayer
PolygonPainter
Polyline
PolylineLayer
PolylinePainter
PositionedTapController
PositionedTapDetector2
Proj4Crs
Custom CRS
Projection
RenderTranslucentPointer
A render object that is invisible to its parent during hit testing.
RichAttributionWidget
A prebuilt dynamic attribution layer that supports both logos and text through SourceAttributions
RichAttributionWidgetAnimation
Animation provider interface for a RichAttributionWidget
RotatedOverlayImage
Spans an image across three corner points.
ScaleRAWA
Prebuilt animation provider for a RichAttributionWidget
SimpleAttributionWidget
A simple, classic style, attribution layer
SourceAttribution
Base class for attributions that render themselves as widgets in a RichAttributionWidget
SphericalMercator
TapPosition
TextSourceAttribution
A simple text attribution displayed in the popup box of a RichAttributionWidget
TileCoordinates
TileDisplay
TileImage
TileLayer
Describes the needed properties to create a tile-based layer. A tile is an image bound to a specific geographical position.
TileProvider
The base tile provider, extended by other classes with more specialised purposes and/or requirements
TileUpdateEvent
Describes whether loading and/or pruning should occur and allows overriding the load center/zoom.
TileUpdateTransformers
Set of default TileUpdateTransformers
Transformation
TranslucentPointer
A widget that is invisible for its parent during hit testing, but still allows its subtree to receive pointer events
UnconstrainedCamera
Does not apply any constraint to a MapCamera
WMSTileLayerOptions

Enums

AttributionAlignment
Position to anchor RichAttributionWidget to relative to the FlutterMap
CursorRotationBehaviour
The behaviour of the cursor/keyboard rotation function in terms of the angle that the map is rotated to
EvictErrorTileStrategy
MapEventSource
Event sources which are used to identify different types of MapEvent events
PolygonLabelPlacement
RetinaMode
Retina mode improves the resolution of map tiles, particularly on high density displays

Extensions

DoublePointExtension
This extension contains methods which, if defined on Point
IntegerPointExtension
This extension contains methods which, if defined on Point
OffsetToPointExtension
PointExtension

Functions

coordinateDebugTileBuilder(BuildContext context, Widget tileWidget, TileImage tile) Widget
Shows coordinates over Tiles
darkModeTileBuilder(BuildContext context, Widget tileWidget, TileImage tile) Widget
Applies inversion color matrix on Tiles which may simulate Dark mode. darkModeTilesContainerBuilder is better at performance because it applies color matrix on the container instead of on every Tile
darkModeTilesContainerBuilder(BuildContext context, Widget tilesContainer) Widget
Applies inversion color matrix on Tiles container which may simulate Dark mode.
isClockwise(List<LatLng> points) bool
loadingTimeDebugTileBuilder(BuildContext context, Widget tileWidget, TileImage tile) Widget
Shows the Tile loading time in ms

Typedefs

CustomPoint<T extends num> = Point<T>
ErrorTileCallBack = void Function(TileImage tile, Object error, StackTrace? stackTrace)
IsKeyCursorRotationTrigger = bool Function(LogicalKeyboardKey key)
See CursorKeyboardRotationOptions.isKeyTrigger
LongPressCallback = void Function(TapPosition tapPosition, LatLng point)
MapEventCallback = void Function(MapEvent)
MoveAndRotateResult = ({bool moveSuccess, bool rotateSuccess})
PointerCancelCallback = void Function(PointerCancelEvent event, LatLng point)
PointerDownCallback = void Function(PointerDownEvent event, LatLng point)
PointerHoverCallback = void Function(PointerHoverEvent event, LatLng point)
PointerUpCallback = void Function(PointerUpEvent event, LatLng point)
PositionCallback = void Function(MapPosition position, bool hasGesture)
TapCallback = void Function(TapPosition tapPosition, LatLng point)
TapPositionCallback = void Function(TapPosition position)
TemplateFunction = String Function(String str, Map<String, String> data)
TileBuilder = Widget Function(BuildContext context, Widget tileWidget, TileImage tile)
TileUpdateTransformer = StreamTransformer<TileUpdateEvent, TileUpdateEvent>
Defines which TileUpdateEvents should cause which TileUpdateEvents and when