【问题标题】:Here Maps API Location Address这里 Maps API 位置地址
【发布时间】:2014-06-13 16:10:01
【问题描述】:

Here Maps:我最初使用此代码在类别搜索中获取地址,但现在地址似乎已被删除并替换为 HTML 中的邻近属性。这是正确的吗?有没有办法获得这种详细程度?

if (locations[i].address.house != undefined) { 
  catResults2 = catResults2 +  locations[i].address.house + " " 
}
if (locations[i].address.street != undefined) {
  catResults2 = catResults2 +  locations[i].address.street
}
if (locations[i].address.district != undefined) { 
  catResults2 = catResults2 +  ", " + locations[i].address.district
}
if (locations[i].address.city != undefined) { 
  catResults2 = catResults2 +  ", " + locations[i].address.city
}
if (locations[i].address.state != undefined) { 
  catResults2 = catResults2 +  ", " +  locations[i].address.state
} 
if (locations[i].address.postalCode != undefined) {
   catResults2 = catResults2 + " " + locations[i].address.postalCode
}
if (locations[i].address.country != undefined) { 
  catResults2 = catResults2 +  ", " +  locations[i].address.country
}  
if (locations[i].address.countryCode != undefined) { 
  catResults2 = catResults2 + " " +   locations[i].address.countryCode
};

【问题讨论】:

    标签: geocoding here-api


    【解决方案1】:

    如果您使用 HERE Maps API for JavaScript(如本示例中的 here)对某个位置的地址进行反向地理编码,则可以使用

    获取正确本地化的地址
    locations[i].address.text
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-15
      • 2020-12-21
      • 2019-11-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多