0
我正在使用下面的代碼找到中心並放大我的代碼,這是使用谷歌地圖api V2。谷歌地圖Api版本2到谷歌地圖Api版本3
function calculaCentro(points){
alert("in calcula Centro");
var gbounds = new GBounds(points);
alert("gbounds is" +gbounds);
var center = gbounds.mid();
return center;
}
function calculaZoom(points){
alert("in calcula zoom");
var gbounds = new GBounds(points);
var n = new GLatLng(gbounds.min().y,gbounds.min().x);
var s = new GLatLng(gbounds.max().y,gbounds.max().x);
var zoom = map.getBoundsZoomLevel(new GLatLngBounds(n,s));
return zoom;
}
現在我想將它轉換爲谷歌地圖Api V3.But找不到任何確切的替代GBounds.Can任何人都可以幫我嗎?