我可以使用 GeoCoordinateWatcher 类获取 Windows Phone 7 上的当前 GPS 坐标,如下所示msdn,我只能得到Latitude and 经度值,但我想得到Address那个位置的。市场上有一个名为“Where Am I”的免费应用程序,它也显示地址名称,所以我认为这是可能的。
我怎么做到这一点?
您可以使用 Google 或 Yahoo API
YOURKEY
YOURKEY
这是来自 Google 的示例 json 响应
{
"name": "20.00,2.00",
"Status": {
"code": 200,
"request": "geocode"
},
"Placemark": [
{
"id": "p1",
"address": "Adrar des Ifôghas, Mali",
"AddressDetails": {
"Accuracy": 0,
"AddressLine": [
"Adrar des Ifôghas"
]
},
"ExtendedData": {
"LatLonBox": {
"north": 22.6604651,
"south": 17.2938071,
"east": 6.0979005,
"west": -2.0979005
}
},
"Point": {
"coordinates": [
2,
20,
0
]
}
}
]
}
EDIT
您可以使用WebClient来获取结果
WebClient w = new WebClient();
string page = w.DownloadString(url);
以下是解析 Json 结果的示例
Google 地图 v3 地理编码服务器端
寻找带有 JSON 客户端库的 REST
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)