AMapView class

A native map with a per-instance controller and declarative overlays.

The widget owns and releases its native map. latitude and longitude use GCJ-02. These coordinates and zoom set the initial camera. Use the controller from onMapCreated for later moves. A stable overlay ID updates the existing overlay on this map. Removing the ID removes the overlay.

Inheritance

Constructors

AMapView({Key? key, double latitude = 39.90923, double longitude = 116.397428, double zoom = 12, List<AMapMarker> markers = const [], List<AMapPolyline> polylines = const [], List<AMapCircle> circles = const [], List<AMapPolygon> polygons = const [], ValueChanged<String>? onMarkerTap, ValueChanged<AMapLatLng>? onMapTap, ValueChanged<AMapController>? onMapCreated, ValueChanged<AMapCameraEvent>? onCameraMove, ValueChanged<AMapCameraEvent>? onCameraIdle, ValueChanged<AMapStatus>? onStatusChanged, ValueChanged<String>? onError})
const

Properties

circles → List<AMapCircle>
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
latitude → double
final
longitude → double
final
markers → List<AMapMarker>
final
onCameraIdle → ValueChanged<AMapCameraEvent>?
Receives the final position and attributed reason after camera motion.
final
onCameraMove → ValueChanged<AMapCameraEvent>?
Receives camera positions while the viewport is changing.
final
onError → ValueChanged<String>?
Receives an error code for this map instance.
final
onMapCreated → ValueChanged<AMapController>?
Supplies the controller once this widget has a native map view.
final
onMapTap → ValueChanged<AMapLatLng>?
A native basemap single tap with its GCJ-02 coordinate.
final
onMarkerTap → ValueChanged<String>?
Receives the stable ID of a tapped marker on this map.
final
onStatusChanged → ValueChanged<AMapStatus>?
Observes native map creation, readiness, loading and failure.
final
polygons → List<AMapPolygon>
final
polylines → List<AMapPolyline>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
zoom → double
final

Methods

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