찾고있는 것은 역 지오 코딩입니다. 지오 코디네이트를 주소로 변환.
이전에 언급했듯이 WP7에서 Google과 Bing을 사용하여이를 달성 할 수 있습니다. Windows phone 8에서 Geocoding 및 Reverse Geocoding은 프레임 워크의 일부로 지원됩니다. GeoCoding at this Nokia intro article ('지오 코딩'아래) 및 더 포괄적 인 개요 at this other Nokia article에 대한 개요를 읽을 수 있습니다. 여기
는 주소로 좌표로 변환 역 지오 코딩의 예 :
private void Maps_ReverseGeoCoding(object sender, RoutedEventArgs e)
{
ReverseGeocodeQuery query = new ReverseGeocodeQuery()
{
GeoCoordinate = new GeoCoordinate(37.7951799798757, -122.393819969147)
};
query.QueryCompleted += query_QueryCompleted;
query.QueryAsync();
}
void query_QueryCompleted(object sender, QueryCompletedEventArgs<IList<MapLocation>> e)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("Ferry Building Geocoding results...");
foreach (var item in e.Result)
{
sb.AppendLine(item.GeoCoordinate.ToString());
sb.AppendLine(item.Information.Name);
sb.AppendLine(item.Information.Description);
sb.AppendLine(item.Information.Address.BuildingFloor);
sb.AppendLine(item.Information.Address.BuildingName);
sb.AppendLine(item.Information.Address.BuildingRoom);
sb.AppendLine(item.Information.Address.BuildingZone);
sb.AppendLine(item.Information.Address.City);
sb.AppendLine(item.Information.Address.Continent);
sb.AppendLine(item.Information.Address.Country);
sb.AppendLine(item.Information.Address.CountryCode);
sb.AppendLine(item.Information.Address.County);
sb.AppendLine(item.Information.Address.District);
sb.AppendLine(item.Information.Address.HouseNumber);
sb.AppendLine(item.Information.Address.Neighborhood);
sb.AppendLine(item.Information.Address.PostalCode);
sb.AppendLine(item.Information.Address.Province);
sb.AppendLine(item.Information.Address.State);
sb.AppendLine(item.Information.Address.StateCode);
sb.AppendLine(item.Information.Address.Street);
sb.AppendLine(item.Information.Address.Township);
}
MessageBox.Show(sb.ToString());
}
나는 다음과 같은 메시지 박스를 얻을 내 WP8에이 코드를 실행하면 :
[어떻게 얻을 wp7와 GPS 좌표의 주소 이름] (http://stackoverflow.com/questions/9294474/how-to-get-address-name-of-gps-coordinate-with-wp7) –
이것은 중복되지 않습니다. 이전 질문은 WP7을 대상으로 한 것이므로 WP8은 역 지오 코드 조회를 수행하는 새롭고 향상된 방법을 제공합니다. @JustinAngels 아래 답변을 참조하십시오. –