Android; MapView, how can I set default location?

Viewed 14994

Using the MapView in android, how can I set a default location, so that everytime I load up this application, it automatically centers/zooms location in on London?

2 Answers

For new Google Maps API you need to do this:

mapFragment.getMapAsync(this::setUpMaps);

And inside setUpMaps(GoogleMap googleMap) you should move camera to your default location:

googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(location, zoom));
Related