google_maps在移动地图后获取数据(onCameraIdle)

时间:2019-06-28 10:49:42

标签: flutter

在用户使用onCameraIdle移动地图和/或缩放地图之后,尝试获取新的GoogleMap数据,但无法弄清楚如何获取该数据?任何输入都将受到欢迎。

GoogleMap(
        mapType: MapType.normal,
        gestureRecognizers: Set()
          ..add(Factory<PanGestureRecognizer>(() => PanGestureRecognizer()))
          ..add(
            Factory<VerticalDragGestureRecognizer>(
                () => VerticalDragGestureRecognizer()),
          )
          ..add(
            Factory<HorizontalDragGestureRecognizer>(
                () => HorizontalDragGestureRecognizer()),
          )
          ..add(
            Factory<ScaleGestureRecognizer>(() => ScaleGestureRecognizer()),
          ),
        initialCameraPosition: campos,
        onMapCreated: (GoogleMapController controller) {
          _controller.complete(controller);
        },
        myLocationButtonEnabled: false,
        onCameraIdle: () {         
          // This is where I want to grab the data?
        },
      );

0 个答案:

没有答案