Skip to content

Instantly share code, notes, and snippets.

@kenzieschmoll
Created March 15, 2019 19:54
Show Gist options
  • Save kenzieschmoll/75db39377331a1e0f0e59268fc8f3063 to your computer and use it in GitHub Desktop.
Save kenzieschmoll/75db39377331a1e0f0e59268fc8f3063 to your computer and use it in GitHub Desktop.
Maps Sample V2 - add onAddmarkerButtonPressed() pt 2 - track camera position
LatLng _lastMapPosition = _center;
void _onCameraMove(CameraPosition position) {
_lastMapPosition = position.target;
}
@override
Widget build(BuildContext context) {
return MaterialApp(
...
GoogleMap(
...
onCameraMove: _onCameraMove,
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment