BING Maps API丢失地理编码

时间:2016-12-28 16:54:15

标签: c# bing-maps bing-api

我们在C#中有一个方法来获取某些地址的地理编码位置。它99%的时间都很好用。我遇到了一个有趣的情况,我希望有人遇到类似的情况。我还没有能够在BING论坛上或通过他们的开发资源找到类似的问题。

WebClient client = new WebClient();
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");

Stream data = client.OpenRead(uri);
StreamReader reader = new StreamReader(data);
string s = reader.ReadToEnd();

// Doing some magic with the response object here

此特定情况的URI为:

http://dev.virtualearth.net/REST/v1/Locations?q=285%20Annshelia%20Dr,%20Keswick%20ON&key=<LIVEKEY>

我们从服务器获得的响应是​​:

{"authenticationResultCode":"ValidCredentials","brandLogoUri":"http:\/\/dev.virtualearth.net\/Branding\/logo_powered_by.png","copyright":"Copyright © 2016 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","resourceSets":[{"estimatedTotal":0,"resources":[]}],"statusCode":200,"statusDescription":"OK","traceId":"<THE_TRACE>"}

没有为&#34; X-MS-BM-WS-INFO&#34;设置HTML标头。所以它不是一个过载问题,我们确实有一个企业密钥。

我感兴趣的部分是如果我们前往Bing Maps website并搜索285 Annshelia Dr,Keswick ON L4P 3A6的地址,我们将获得一个合适的地理编码位置。

当我要求地理编码时,有人可以解释为什么这会让我一片空白吗?

2 个答案:

答案 0 :(得分:3)

我已经看过了这个。这个问题是在这个时候出现的。 Bing Maps网站目前正在使用具有新数据集的新后端地理编码器。这个新的地理编码器正在进行质量控制测试,Bing Maps团队正在使用Bing Maps网站作为这个新地理编码器的测试站点。一旦质量控制测试在几个月内完成,Bing Maps开发人员API将在后端更新。

答案 1 :(得分:0)

已发现问题 - 这是街道名称上的拼写错误。

相关问题