public virtual void OnPositionChanged(GeoPositionChangedEventArgs <GeoCoordinate> e) { EventHandler <GeoPositionChangedEventArgs <GeoCoordinate> > t = PositionChanged; if (t != null) { t(this, e); } }
protected void OnPositionChanged(GeoPositionChangedEventArgs <GeoCoordinate> e) { Utility.Trace("GeoCoordinateWatcher.OnPositionChanged: " + e.Position.Location.ToString()); EventHandler <GeoPositionChangedEventArgs <GeoCoordinate> > t = PositionChanged; if (t != null) { t(this, e); } }
private void OnInternalLocationChanged(object sender, GeoPositionChangedEventArgs <GeoCoordinate> e) { if (e.Position != null) { Utility.Trace("GeoCoordinateWatcher.OnInternalLocationChanged: " + e.Position.ToString()); // // Only fire event when location change exceeds the movement threshold or the coordinate // is unknown, as in the case of a civic address only report. // if ((m_lastCoordinate == GeoCoordinate.Unknown) || (e.Position.Location == GeoCoordinate.Unknown) || (e.Position.Location.GetDistanceTo(m_lastCoordinate) >= m_threshold)) { m_lastCoordinate = e.Position.Location; PostEvent(OnPositionChanged, new GeoPositionChangedEventArgs <GeoCoordinate>(e.Position)); OnPropertyChanged("Position"); } } }