【问题标题】:Can't find point of interest with geocoding无法通过地理编码找到兴趣点
【发布时间】:2016-07-27 20:03:01
【问题描述】:

我有一个使用 javascript google geocoder 的网络应用程序:

var geocoder = new google.maps.Geocoder();
geocoder.geocode({ 'address': from }, function(results, status) {
    var from_lat = results[0].geometry.location.lat();
    var from_lng = results[0].geometry.location.lng();
});

它几乎可以找到任何地址,但如果我搜索一些兴趣点,我会得到:ZERO_RESULTS 状态。 例如:

"Azrieli Center, Derech Menachem Begin, Tel Aviv-Yafo, Israel"

如何更改我的代码才能找到这种地方?

【问题讨论】:

    标签: javascript geolocation google-geocoder


    【解决方案1】:

    企业被排除在地理编码 API 之外,因此您必须使用 Maps JavaScript API 的 places library 才能找到像这样的 POI。

    请在 jsbin 上查看此示例:http://jsbin.com/jayabe/edit?html,output

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-02-19
      • 2014-07-01
      • 1970-01-01
      • 2015-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多