可以使用ReverseGeocodingQuery,以獲取有關您的當前位置信息,但它不是工作脫機。
獲取信息使用下面的代碼行:
string NameOfPlace = "";
ReverseGeocodeQuery MyReverseGeocodeQuery = null;
void GetNameOfPlace(GeoCoordinate geoCoordinate)
{
MyReverseGeocodeQuery = new ReverseGeocodeQuery();
MyReverseGeocodeQuery.GeoCoordinate = new GeoCoordinate(geoCoordinate.Latitude, geoCoordinate.Longitude);
MyReverseGeocodeQuery.QueryCompleted += ReverseGeocodeQuery_QueryCompleted;
MyReverseGeocodeQuery.QueryAsync();
}
private void ReverseGeocodeQuery_QueryCompleted(object sender, QueryCompletedEventArgs<IList<MapLocation>> e)
{
var result = e.Result[0];
NameOfPlace = result.Information.Address.Street + " " + result.Information.Address.City + " " + result.Information.Address.Country;
}
結果爲會有地理座標48.774010,9.224396將祖爾Staibhöhe德國斯圖加特。
順便說一句。:手機的定位正在使用(如果語言是德語,其結果必然是祖爾Staibhöhe斯圖加特五金)
有做脫機的API。 – WiredPrairie