5
如何放大/縮小地圖視圖以覆蓋所有標記?android縮放到Google Map地圖上的所有標記
我在評論sdk中給出的gmap V2的示例代碼。它奠定了sdk \ extras \ google \ google_play_services \ samples \ maps。
在此先感謝。
如何放大/縮小地圖視圖以覆蓋所有標記?android縮放到Google Map地圖上的所有標記
我在評論sdk中給出的gmap V2的示例代碼。它奠定了sdk \ extras \ google \ google_play_services \ samples \ maps。
在此先感謝。
嘗試使用LatLngBounds
:
LatLngBounds.Builder builder = new LatLngBounds.Builder();
builder.include(Latlng1);
builder.include(Latlng2);
LatLngBounds bounds = builder.build();
map.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 20));
我使用的是相同的,但它沒有覆蓋所有標記。它掛在哪裏之間的索姆。 – Dhrupal 2013-05-07 08:49:20
你是什麼意思:「它掛在哪裏之間的索姆」?你是否在建設者中包含所有Latlng點? – 2013-05-07 08:50:36
是的,我包括你已經告訴過的相同的方式,即使它發現latlong但沒有放大視圖.... – Dhrupal 2013-05-07 08:56:06