Reputation: 88
How can show markers on specific zoom level using Google Maps Android API v2? I have more than 1000 Markers, so it's not good idea to show all on start.
Here is simple example:
#// latitude and longitude
double latitude = 40.738933;
double longitude = -74.001366;
// create marker
MarkerOptions marker = new MarkerOptions().position(new LatLng(latitude, longitude)).title("Hello Maps ");
// adding marker
googleMap.addMarker(marker);
#
Thank you for help
Upvotes: 1
Views: 6843
Reputation: 4241
put below code
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(HAMBURG, 15));
here Move the camera instantly to marker with a zoom of 15. if you wanna change zoom level you can change.
Upvotes: 9