MapController class Null safety

Controller to programmatically interact with FlutterMap.

It allows for map movement through move, rotation through rotate and to fit the map bounds with fitBounds.

It also provides current map properties.

Implementers

Constructors

MapController()
factory

Properties

bounds LatLngBounds?
read-only
center LatLng
read-only
hashCode int
The hash code for this object.
read-onlyinherited
mapEventSink StreamSink<MapEvent>
read-only
mapEventStream Stream<MapEvent>
read-only
rotation double
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
state FlutterMapState
write-only
zoom double
read-only

Methods

centerZoomFitBounds(LatLngBounds bounds, {FitBoundsOptions? options}) CenterZoom
Calcs the new center and zoom for the map bounds. Optional constraints can be defined through the options parameter.
dispose() → void
fitBounds(LatLngBounds bounds, {FitBoundsOptions? options}) → void
Fits the map bounds. Optional constraints can be defined through the options parameter.
latLngToScreenPoint(LatLng latLng) CustomPoint<num>?
move(LatLng center, double zoom, {String? id}) bool
Moves the map to a specific location and zoom level
moveAndRotate(LatLng center, double zoom, double degree, {String? id}) MoveAndRotateResult
Calls move and rotate together however layers will rebuild just once instead of twice
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
pointToLatLng(CustomPoint<num> point) LatLng?
rotate(double degree, {String? id}) bool
Sets the map rotation to a certain degrees angle (in decimal).
toString() String
A string representation of this object.
inherited

Operators

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