Επεξεργασία

Κοινή χρήση μέσω


GeoCoordinateWatcher.MovementThreshold Property

Definition

The distance that must be moved, in meters, relative to the coordinate from the last PositionChanged event, before the location provider raises another PositionChanged event.

public:
 property double MovementThreshold { double get(); void set(double value); };
public double MovementThreshold { get; set; }
member this.MovementThreshold : double with get, set
Public Property MovementThreshold As Double

Property Value

Distance, in meters.

Remarks

The default movement threshold is zero, which means that any change in location detected by the current location provider causes a PositionChanged event and an update in the Position property.

Note

The movement threshold does not guarantee that events will be received at the requested threshold. The platform attempts to honor requests for a particular movement threshold, but in some cases, the events will not be raised at the requested threshold.

Note In versions of Windows prior to Windows 7, the following conditions apply:

The following diagram represents location coordinates that the location provider (for example, a GPS device) supplies to the computer. P1, in the diagram, represents the location data included in a PositionChanged event, and P2, P3, and P4 represent points within the movement threshold. So when the location provider supplies data indicating a location at those points (P1, P2, P3, and P4), no PositionChanged events are raised, and Position returns P1. The point P5 is outside of the MovementThreshold distance, so at that point, Position is updated and a PositionChanged event is raised.

Diagram illustrating MovementThreshold

Applies to