StatefulMapController class

The map controller

Constructors

StatefulMapController({@required MapController mapController, TileLayerType tileLayerType = TileLayerType.normal, TileLayerOptions customTileLayer, bool verbose = false})
Provide a Flutter map MapController

Properties

center LatLng
The map center value
read-only
changeFeed Stream<StatefulMapControllerStateChange>
A stream with changes occuring on the map
read-only
customTileLayer TileLayerOptions
A custom tile layer options
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
lines List<Polyline>
The lines present on the map
read-only
mapController MapController
The Flutter Map MapController
final
mapOptions MapOptions
The Flutter Map MapOptions
read / write
markers List<Marker>
The markers present on the map
read-only
namedLines Map<String, Polyline>
The named lines present on the map
read-only
namedMarkers Map<String, Marker>
The markers present on the map and their names
read-only
namedPolygons Map<String, Polygon>
The named polygons present on the map
read-only
onReady Future<void>
On ready callback: this is fired when the contoller is ready
read-only
polygons List<Polygon>
The polygons present on the map
read-only
rotate double
Rotate the map
write-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
statefulMarkers Map<String, StatefulMarker>
The stateful markers present on the map
read-only
tileLayer TileLayerOptions
The current map tile layer
read-only
tileLayerType TileLayerType
The initial tile layer
read / write
verbose bool
Verbosity level
final
zoom double
The map zoom value
read-only

Methods

addLine({String name, List<LatLng> points, double width = 3.0, Color color = Colors.green, bool isDotted = false}) Future<void>
Add a line on the map
addLineFromGeoPoints({String name, List<GeoPoint> geoPoints, double width = 3.0, Color color = Colors.green, bool isDotted = false}) Future<void>
Add a line on the map
addMarker({Marker marker, String name}) Future<void>
Add a marker on the map
addMarkers({Map<String, Marker> markers}) Future<void>
Add multiple markers to the map
addPolygon({String name, List<LatLng> points, Color color = Colors.lightBlue, double borderWidth = 0.0, Color borderColor = const Color(0xFFFFFF00)}) Future<void>
Add a polygon on the map
addStatefulMarker({String name, StatefulMarker statefulMarker}) → void
addStatefulMarkers(Map<String, StatefulMarker> statefulMarkers) → void
centerOnPoint(LatLng point) Future<void>
Center the map on a LatLng
fitLine(String name) Future<void>
Fit bounds and zoom the map to center on a line
fitMarker(String name) Future<void>
Fit bounds for one marker on map
fitMarkers() Future<void>
Fit bounds for all markers on map
fromGeoJson(String data, {bool verbose = false, Icon markerIcon = const Icon(Icons.location_on), bool noIsolate = false}) Future<void>
Display some geojson data on the map
mutateMarker({String name, String property, dynamic value}) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
notify(String name, dynamic value, Function from, MapControllerChangeType type) → void
Notify to the changefeed
onPositionChanged(MapPosition pos, bool gesture) → void
The callback used to handle gestures and keep the state in sync
removeLine(String name) Future<void>
Remove a line from the map
removeMarker({String name}) Future<void>
Remove a marker from the map
removeMarkers({List<String> names}) Future<void>
Remove multiple makers from the map
removePolygon(String name) Future<void>
Remove a polygon from the map
switchTileLayer(TileLayerType layer) → void
Switch to a tile layer
toGeoJson() String
Convert the map assets to a geojson string
toGeoJsonFeatures() GeoJsonFeatureCollection
Export all the map assets to a GeoJsonFeatureCollection
toString() String
A string representation of this object. [...]
inherited
zoomIn() Future<void>
Zoom in one level
zoomOut() Future<void>
Zoom out one level
zoomTo(double value) Future<void>
Zoom to level

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited