Map class

The Map widget displays a Google Map with a specific latitude, longitude, tilt, bearing and zoom level. The zoom level can be adjusted using the boost parameter.

The map can be constrained to a specific bounds if provided, it can also display a set of polylines on the map. It also loads a KML layer on the map based on the kmlName provided. The mapType can be set to display a specific type of map. A minMaxZoomPreference can be set to limit the zoom levels of the map. If a canOrbit flag is set to true, the map can be orbited with a specific orbitTilt and orbitRange.

Inheritance

Constructors

Map({Key? key, required double latitude, required double longitude, required double zoom, required double tilt, required double bearing, required double orbitTilt, required double orbitRange, MapType mapType = MapType.none, Set<Polyline> polylines = const {}, String? kmlName, LatLngBounds? bounds, int boost = 0, bool canOrbit = true, MinMaxZoomPreference minMaxZoomPreference = MinMaxZoomPreference.unbounded})

Properties

bearing double
getter/setter pair
boost int
final
bounds LatLngBounds?
final
canOrbit bool
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
kmlName String?
final
latitude double
getter/setter pair
longitude double
getter/setter pair
mapType MapType
final
minMaxZoomPreference MinMaxZoomPreference
final
orbitRange double
final
orbitTilt double
final
polylines Set<Polyline>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tilt double
final
zoom double
getter/setter pair

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _MapState
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}) 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