Skip to content

Instantly share code, notes, and snippets.

@Aditsyal
Created April 11, 2019 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aditsyal/7d0f293521d085e8e9a6cb32fc79dd21 to your computer and use it in GitHub Desktop.
Save Aditsyal/7d0f293521d085e8e9a6cb32fc79dd21 to your computer and use it in GitHub Desktop.
Future<void> _goToNewYork() async {
double lat = 40.7128;
double long = -74.0060;
GoogleMapController controller = await _controller.future;
controller.animateCamera(CameraUpdate.newLatLngZoom(LatLng(lat, long), _zoom));
setState(() {
_markers.add(
Marker(
markerId: MarkerId('newyork'),
position: LatLng(lat, long),
),
);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment