如何在GoogleMap上检测平移手势?我还需要检测用户触摸的纬度和经度。 我已经尝试过了,但是没有成功:
GoogleMap(
mapType: MapType.hybrid,
initialCameraPosition: CameraPosition(
target: LatLng(37.42796133580664, -122.085749655962),
zoom: 14.4746,
),
gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>[
Factory<OneSequenceGestureRecognizer>(
() => PanGestureRecognizer()
..onUpdate = (data) {
print(data.localPosition);
},
),
].toSet(),
onMapCreated: (GoogleMapController controller) {
_mapController.complete(controller);
},
)