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
mapEventStream Stream<MapEvent>
read-only
onReady Future<Null>
read-only
rotation double
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
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.
fitBounds(LatLngBounds bounds, {FitBoundsOptions? options}) → void
Fits the map bounds. Optional constraints can be defined through the options parameter.
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
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