问题描述
我使用Flutter_map导入openstreetmap图块,我想知道是否有可能检索屏幕上显示内容的地理范围?
解决方法
您也许可以在 onPositionChanged 中使用 mapController 的边界:
FlutterMap(
mapController: _mapController,options: MapOptions(
center: _currentLocation,zoom: 10,onPositionChanged: (position,e) {
var extent = _mapController.bounds; // <= this line here
}),layers: [],),