1
votes

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

1
Bro, there are thousands of duplicate questions on this topic on this site. Please search before posting. - KickAss
try to implements OnCameraChangeListener - Imtiyaz Khalani

1 Answers

9
votes

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.