As title, in map v1 i could use
mapController.zoomToSpan(..., ..., ...);
to include all markers on the screen.
Dose map V2 has the same method?
2013/2/22 edit:
first, get all LatLng points you want to involve on the screen.
Assume if you have 3 LatLng points, use
LatLngBounds bounds = new LatLngBounds.Builder().include(point1)
.include(point2).include(point3).build();
mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 50));
Try This
map.addMarker(new MarkerOptions().position(latlng)).setVisible(true);
// Move the camera instantly to location with a zoom of 15.
map.moveCamera(CameraUpdateFactory.newLatLngZoom(latlng, 15));
// Zoom in, animating the camera.
map.animateCamera(CameraUpdateFactory.zoomTo(14), 2000, null);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With