常见任务

1.定位服务

            GeoPositionAccuracy accuracy = GeoPositionAccuracy.Default;
            GeoCoordinateWatcher watcher = new GeoCoordinateWatcher();
            watcher.StatusChanged += new EventHandler<GeoPositionStatusChangedEventArgs>(watcher_StatusChanged);
            watcher.Start();
            MessageBox.Show(str);
  private void watcher_PositionChanged(object sender, GeoPositionChangedEventArgs<GeoCoordinate> e)
        {
            GeoCoordinate coordinate = e.Position.Location;
             str = "纬度" + coordinate.Latitude + "经度" + coordinate.Longitude+"速度:"+cordinate.Speed+"海拔高度"+coordinate.Altitude;
           
        }

2.

posted @ 2012-05-31 18:12  蓝亭赏月  阅读(158)  评论(0编辑  收藏  举报