【问题标题】:Google maps Api Version 2 to Google maps Api Version 3Google 将 Api 版本 2 映射到 Google 地图 Api 版本 3
【发布时间】:2013-04-25 07:18:17
【问题描述】:

我正在使用以下代码来查找中心并放大使用 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;
}

现在我想将其转换为 google maps Api V3。但找不到任何 GBounds 的确切替代品。有人可以帮我吗?

【问题讨论】:

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


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-15
    • 1970-01-01
    • 1970-01-01
    • 2020-12-03
    相关资源
    最近更新 更多