2013-09-24 2 views
0

임 클릭 한 후 채우는 버튼을 구현하기 위해 노력하고윈도우 폰 8 : (현재 위치에서) 현재 주소 - 데이터를 얻을 수

  • 위도
  • 경도
  • 거리
  • Streetnumber
  • 우편 번호
  • 도시

myGeoposition.CivicAddress. 도시 및 우편 번호

myGeoposition.Coordinate. 라티/경도

어디에서 나머지를 얻을 수 있습니까?

나는지도 - 제어 (빙없는지도를!)를 사용하여 오전 : Microsoft.Phone.Maps.Controls, 조립 = Microsoft.Phone.Maps

try 
     { 
      Geolocator geolocator = new Geolocator(); 
      geolocator.DesiredAccuracy = PositionAccuracy.Default; 
      IAsyncOperation<Geoposition> locationTask = null; 

      try 
      { 
       locationTask = geolocator.GetGeopositionAsync(TimeSpan.FromMinutes(1), TimeSpan.FromSeconds(15)); 
       Geoposition myGeoposition = await locationTask; 
       Geocoordinate myGeocoordinate = myGeoposition.Coordinate; 

       GeoCoordinate myGeoCoordinate = 
       CoordinateConverter.ConvertGeocoordinate(myGeocoordinate); 
사용할 수

답변

3

ReverseGeocodeQuery class에서 정보를 얻을 수 있습니다 위치 :

MapAddress address; 
ReverseGeocodeQuery query = new ReverseGeocodeQuery(); 
query.GeoCoordinate = myGeoCoordinate; 
query.QueryCompleted += (s, e) => 
    { 
     if (e.Error != null) 
      return; 

     address = e.Result[0].Information.Address; 
    }; 
query.QueryAsync();