MapController class abstract

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?
no setter
center → LatLng
no setter
hashCode int
The hash code for this object.
no setterinherited
mapEventStream Stream<MapEvent>
no setter
onReady Future<Null>
no setter
rotation double
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
zoom double
no setter

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 nonexistent 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