GeoCoordinateWatcher Class

May 11, 2014

A provider class exposing the Windows Phone location service.

System.Object
  System.Device.Location.GeoCoordinateWatcher

Namespace:  System.Device.Location
Assembly:  System.Device (in System.Device.dll)
XMLNS for XAML: Not mapped to an xmlns.

public class GeoCoordinateWatcher : IDisposable, 
	INotifyPropertyChanged, IGeoPositionWatcher<GeoCoordinate>
<GeoCoordinateWatcher .../>

The GeoCoordinateWatcher type exposes the following members.

  NameDescription
Public methodGeoCoordinateWatcher()Instantiates a new instance of the GeoCoordinateWatcher class with the DesiredAccuracy value of Default.
Public methodGeoCoordinateWatcher(GeoPositionAccuracy)Instantiates a new instance of the GeoCoordinateWatcher class with the provided DesiredAccuracy value.
Top

  NameDescription
Public propertyDesiredAccuracyThe desired accuracy for data returned from the location service.
Public propertyMovementThresholdThe minimum distance that must be travelled between successive PositionChanged events.
Public propertyPermissionThe application’s level of access to the location service.
Public propertyPositionThe most recent position obtained from the location service.
Public propertyStatusThe status of the location service.
Top

  NameDescription
Public methodDisposeReleases managed and unmanaged resources used by the GeoCoordinateWatcher and stops the acquisition of data from the location service.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeReleases unmanaged resources and performs other cleanup operations before the GeoCoordinateWatcher is reclaimed by garbage collection. (Overrides Object.Finalize().)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnPositionChangedRaises the PositionChanged event.
Protected methodOnPositionStatusChangedRaises the PositionChanged event.
Protected methodOnPropertyChangedRaises the PropertyChanged event for the GeoCoordinateWatcher class.
Public methodStart()Security Critical. Starts the acquisition of data from the location service.
Public methodStart(Boolean)Security Critical. Starts the acquisition of data from the location service.
Public methodStopSecurity Critical. Stops the acquisition of data from the location service.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodTryStartSecurity Critical. Attempts to start the acquisition of data from the location service. If the provided timeout interval is exceeded before the location service responds, the request for location is stopped and the method returns false.
Top

  NameDescription
Public eventPositionChangedOccurs when the location service detects a change in position.
Public eventStatusChangedOccurs when the status of the location service changes.
Top

  NameDescription
Explicit interface implemetationPrivate eventINotifyPropertyChanged.PropertyChangedOccurs when a GeoCoordinateWatcher property changes.
Top

Capabilities

If you use this API in your app, you must specify the following capabilities in the app manifest. Otherwise, your app might not work correctly or it might exit unexpectedly.

ID_CAP_LOCATION

Windows Phone 8, Windows Phone OS 7.1

ID_CAP_NETWORKING

Windows Phone 8, Windows Phone OS 7.1

For more info, see App capabilities and hardware requirements for Windows Phone 8.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2014 Microsoft