Reputation: 33
I use flutter_map to import openstreetmap tiles, I would like to know if it is possible to retrieve the geographical extent of what is displayed on the screen?
Upvotes: 0
Views: 483
Reputation: 4396
You could maybe use the bounds of the mapController in onPositionChanged:
FlutterMap(
mapController: _mapController,
options: MapOptions(
center: _currentLocation,
zoom: 10,
onPositionChanged: (position, e) {
var extent = _mapController.bounds; // <= this line here
}),
layers: [],
),
Upvotes: 0