WP7,经度和纬度的位置服务给我一个NaN值

时间:2012-06-04 17:46:04

标签: windows-phone-7 geolocation

GeoCoordinateWatcher watcher = new GeoCoordinateWatcher();
  protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            var myPosition = watcher.Position;
            longTxtBlock.Text = (myPosition.Location.Longitude).ToString();
            latiTxtBlock.Text = (myPosition.Location.Latitude).ToString();

            base.OnNavigatedTo(e);
        }

0 个答案:

没有答案