2016-08-06 4 views

Antwort

1

Sie haben ein LatLngBounds zu erstellen:

List<Marker> myMarkers; //your list of markers 
LatLngBounds.Builder builder = new LatLngBounds.Builder(); 
for(Marker m: myMarkers){ 
    builder.include(m.getPosition()); 
} 
LatLngBounds bounds = builder.build(); 
CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, 20);//20 is padding, use it to avoid markers on the border of the map view 
mMap.animateCamera(cu); 
+0

Vielen Dank –

Verwandte Themen