FlutterMapImpl class

Flutter Map implementation using flutter_map package (OpenStreetMap).

This is a free implementation that doesn't require an API key. It uses OpenStreetMap tiles for rendering.

Example:

FlutterMapImpl(
  center: GeoPoint(latitude: 37.7749, longitude: -122.4194),
  zoom: 13.0,
  geofences: [
    GeoCircleWidget.withRadius(
      center: GeoPoint(latitude: 37.7749, longitude: -122.4194),
      radius: 500,
    ),
  ],
)
Inheritance

Constructors

FlutterMapImpl({Key? key, required GeoPoint center, required double zoom, required List<GeoGeofenceBase> geofences, List<GeoMarkerWidget> markers = const [], OnGeofenceTap? onGeofenceTap, OnMarkerTap? onMarkerTap, OnMapTap? onMapTap, OnMapLongPress? onMapLongPress, bool showZoomControls = true, bool showCompass = true, bool showMyLocationButton = true, double minZoom = 2.0, double maxZoom = 18.0, double rotation = 0.0, bool enableRotation = true, bool enableZoom = true})
const

Properties

center → GeoPoint
The center point of the map.
final
enableRotation → bool
Whether the map can be rotated by user gestures.
final
enableZoom → bool
Whether the map can be zoomed by user gestures.
final
geofences → List<GeoGeofenceBase>
List of geofences to display.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
markers → List<GeoMarkerWidget>
List of markers to display.
final
maxZoom → double
Maximum zoom level.
final
minZoom → double
Minimum zoom level.
final
onGeofenceTap → OnGeofenceTap?
Callback when a geofence is tapped.
final
onMapLongPress → OnMapLongPress?
Callback when the map is long pressed.
final
onMapTap → OnMapLongPress?
Callback when the map is tapped.
final
onMarkerTap → OnGeofenceTap?
Callback when a marker is tapped.
final
rotation → double
Initial map rotation (in degrees).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showCompass → bool
Whether to show compass.
final
showMyLocationButton → bool
Whether to show "my location" button.
final
showZoomControls → bool
Whether to show zoom controls.
final
zoom → double
Initial zoom level.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<FlutterMapImpl>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited