コード例 #1
0
        private void Watcher_PositionChanged(object sender, GeoPositionChangedEventArgs<GeoCoordinate> e)
        {
            Debug.WriteLine("Watcher_PositionChanged ({0}, {1})",
            e.Position.Location.Latitude, e.Position.Location.Longitude);

              _currentLocation = new GeoLocation()
              {
            Latitude = e.Position.Location.Latitude,
            Longitude = e.Position.Location.Longitude
              };
        }
コード例 #2
0
        private void Watcher_StatusChanged(object sender, GeoPositionStatusChangedEventArgs e)
        {
            Debug.WriteLine("Watcher_StatusChanged ({0})", e.Status);

              switch (e.Status)
              {
            case GeoPositionStatus.Disabled:
              _currentLocation = null;
              break;

            case GeoPositionStatus.NoData:
              _currentLocation = null;
              break;
              }
        }
コード例 #3
0
 public GeoLocationSearchItem(GeoLocation location)
 {
     Location    = location;
     DisplayText = string.Format("{0:F2}, {1:F2}", location.Latitude, location.Longitude);
 }
コード例 #4
0
 private void DoCallback(GeoLocation g)
 {
     if(pendingCallback != null)
     {
         pendingCallback(g);
         pendingCallback = null;
     }
 }
コード例 #5
0
 public GeoLocationSearchItem(GeoLocation location)
 {
     Location = location;
       DisplayText = string.Format("{0:F2}, {1:F2}", location.Latitude, location.Longitude);
 }