【问题标题】:how to get same geo code for an address which is in bing map through bing map API?如何通过 bing map API 为 bing map 中的地址获取相同的地理代码?
【发布时间】:2017-06-07 10:06:11
【问题描述】:

我有一个在 bingmap 中显示正确位置的地址。当我使用非结构化 URL API 为同一地址请求地理代码时,它会发送不同的地理位置

地址: 86 Oakleaf Dr Meadow Valley, CA 95956

当我通过 bing map api 请求时

https://dev.virtualearth.net/REST/v1/Locations?CountryRegion=us&adminDistrict=CA&locality=Meadow%20Valley&postalCode=95956&addressLine=86%20Oakleaf%20Dr&output=json&key=BingmapKey

结果在这里的某个地方

我是否遗漏了 API 请求中的任何内容? (我有有效的 bing 密钥)

【问题讨论】:

    标签: bing bing-api bing-maps


    【解决方案1】:
    https://dev.virtualearth.net/REST/v1/Locations?CountryRegion=us&adminDistrict=CA&locality=Meadow%20Valley&postalCode=95956&addressLine=86%20Oakleaf%20Dr.&output=json&key=BingMapsKey
    

    您所拥有的似乎是正确的,我只是在“博士”之后添加了一个句点,并将其更改为您想要的正确位置。

    【讨论】:

    • 这些地址是由系统生成的。我们不能强制将句点. 添加到地址
    【解决方案2】:

    我更改了 API 调用 按地址查找位置通过查询查找位置,它会发送与我们搜索地址时相同的地理位置在 bingmap 网站中。

    我在 Find a Location by Address API 中找不到其他解决方案。

    var url = "https://dev.virtualearth.net/REST/v1/Locations?query=" 
    + encodeURIComponent('Oakleaf Dr Meadow Valley CA 95956 United States')
    + "&incl=queryParse"
    + "&output=json"
    + "&key=" + BingmapKey
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多