-1
腳本芝加哥:獲取變焦城市
var current = new google.maps.LatLng(41.8333925, -88.);
map.setCenter(current);
腳本的丹維爾:
var current = new google.maps.LatLng(36.5925975, -79.5510265);
map.setCenter(current);
它的工作不錯,但我必須使用此setZoom。
所以,如果我使用:
map.setZoom(10);
這有利於芝加哥,但它丹維爾是太遠(12是好的)。
是否有一個類似的函數setZoom,它會給我一個只有給定城市邊界的地圖?芝加哥和丹維爾只是例子。
http://stackoverflow.com/a/11454897/3575770 – phpnerd