0

我试图实现一个点击后填充的按钮

  • 纬度
  • 经度
  • 街道
  • 街牌号码
  • 邮政编码
  • 城市

myGeoposition.CivicAddress。给我城市和邮政编码

我的地理定位。坐标。给我纬度/经度

我在哪里可以得到其余的?

我正在使用来自:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps 的 Map-Control(不是 bing 地图!)

 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);
4

1 回答 1

3

您可以使用ReverseGeocodeQuery 类从某个位置获取信息:

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();
于 2013-09-24T11:16:23.237 回答