【发布时间】:2017-10-11 21:02:52
【问题描述】:
使用 Bing Maps API,是否可以使用“#”对地址进行地理编码
示例 - 这可以使用地址进行地理编码:
1600 Amphitheatre Pkwy APT 23,山景城,CA 94043,美国
但是如果我将 Apt 替换为 #, 1600 Amphitheatre Pkwy #23, 山景城, CA 94043, USA 结果是一个错误。
这是我的网址:
var strAddress ;
string url = "https://dev.virtualearth.net/REST/v1/Locations?query=" +
strAddress + "&key=" + key;
我尝试使用 编码UriComponent, System.Web.HttpUtility.UrlEncode, Uri.EscapeUriString,
像这样 字符串 url = "https://dev.virtualearth.net/REST/v1/Locations?query=" + System.Web.HttpUtility.UrlEncode(strAddress) + "&key=" + key;
它们都不适合我!
基本上,我们在 Plugin 中进行地理编码,而不是在 javascript 中。
有人可以帮我吗?
提前致谢。
【问题讨论】:
-
您是否担心散列的 URL 编码或 bing 地图无法正确处理其中包含散列的地址?
标签: c# plugins dynamics-crm geocoding bing-api