【问题标题】:Flutter_map get geographical extent on screenFlutter_map 在屏幕上获取地理范围
【发布时间】:2020-09-28 15:44:30
【问题描述】:

我使用flutter_map导入openstreetmap瓦片,我想知道是否可以检索屏幕上显示的地理范围?

【问题讨论】:

    标签: flutter geospatial fluttermap


    【解决方案1】:

    你也许可以在 onPositionChanged 中使用 mapController 的边界:

    FlutterMap(
        mapController: _mapController,
        options: MapOptions(
            center: _currentLocation,
            zoom: 10,
            onPositionChanged: (position, e) {
                var extent = _mapController.bounds; // <= this line here
            }),
            layers: [], 
    ),
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-06-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多