tamam ben rakam dışarı ettik android sürüm bulamıyor. Bütün işaretleri mevcut cevabı artık çalışmıyor son SDK sürümü ile
final BoundingBox zoomLevel = findZoomLevel(hotelLocation,poiLocations);
mv.zoomToBoundingBox(zoomLevel,true,true);
.....
private BoundingBox findZoomLevel(LatLng hotelLocation, LatLng[] poiLocations) {
double bottomPadding = 0.002;
double topPadding = 0.005;
BoundingBox box = new BoundingBox(findTopMost(hotelLocation,poiLocations).getLatitude() + topPadding,
findRightMost(hotelLocation,poiLocations).getLongitude(),
findBottomMost(hotelLocation,poiLocations).getLatitude() - bottomPadding,
findLeftMost(hotelLocation,poiLocations).getLongitude());
return box;
}
Güncelleme
LatLngBounds latLngBounds = new LatLngBounds.Builder()
.include(new LatLng(lat1,lng1))
.include(new LatLng(lat2,lng2))
.build();
mapboxMap.moveCamera(
CameraUpdateFactory.newLatLngBounds(LatLngBounds bounds,
int paddingLeft,
int paddingTop,
int paddingRight,
int paddingBottom));
sağlanması için ** zoomToBoundingBox() ** artık mevcut değil gibi görünüyor. alternatif nedir? –
@LordFlash bkz http://stackoverflow.com/a/37561003/284318 –
Hangi birim ölçülen ölçüldü? – cuddlecheek