Google将Api版本2映射到Google地图Api版本3

时间:2013-04-25 07:18:17

标签: google-maps-api-3 google-maps-api-2

我使用以下代码查找中心并放大使用google maps api V2的代码。

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无法找到GBound的任何确切替代品。任何人都可以帮助我吗?

1 个答案:

答案 0 :(得分:1)