【问题标题】:Google Maps v3 get Place Name/Address from coordinatesGoogle Maps v3 从坐标中获取地名/地址
【发布时间】:2013-10-17 20:49:36
【问题描述】:

我通过使用google.maps.placesAutocompleteService.getPlacePredictions 搜索地名找到了地址和纬度。

你如何/可以得到最近的地名/地址与 latlng 坐标?

附:使用 javascript

【问题讨论】:

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


【解决方案1】:

我想知道你是如何从getPlacePredictions 得到 LatLng 的(AFAIK 这不会返回 LatLng)。

但是,当您有 LatLng 时,请使用 google.maps.geometry.spherical.computeDistanceBetween 计算距离并选择距离最短的结果

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-09-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多