C# Class Cimbalino.Phone.Toolkit.Services.LocationService

Represents an implementation of the ILocationService.
Inheritance: LocationServiceBase, ILocationService
Afficher le fichier Open project: Cimbalino/Cimbalino-Phone-Toolkit

Méthodes publiques

Méthode Description
GetPosition ( Exception>.Action locationResult ) : void

Retrieves the current location.

GetPosition ( LocationServiceAccuracy desiredAccuracy, Exception>.Action locationResult ) : void

Retrieves the current location.

GetPosition ( LocationServiceAccuracy desiredAccuracy, System.TimeSpan maximumAge, System.TimeSpan timeout, Exception>.Action locationResult ) : void

Retrieves the current location.

GetPosition ( TimeSpan maximumAge, TimeSpan timeout, Exception>.Action locationResult ) : void

Retrieves the current location.

GetPositionAsync ( ) : Task

Starts an asynchronous operation to retrieve the current location.

GetPositionAsync ( LocationServiceAccuracy desiredAccuracy ) : Task

Starts an asynchronous operation to retrieve the current location.

GetPositionAsync ( LocationServiceAccuracy desiredAccuracy, TimeSpan maximumAge, TimeSpan timeout ) : Task

Starts an asynchronous operation to retrieve the current location.

GetPositionAsync ( TimeSpan maximumAge, TimeSpan timeout ) : Task

Starts an asynchronous operation to retrieve the current location.

LocationService ( ) : System

Initializes a new instance of the LocationService class.

Start ( ) : void

Starts the acquisition of data from the location service.

Start ( LocationServiceAccuracy desiredAccuracy ) : void

Starts the acquisition of data from the location service.

Start ( int desiredAccuracyInMeters ) : void

Starts the acquisition of data from the location service.

Stop ( ) : void

Stops the acquisition of data from the location service.

Méthodes protégées

Méthode Description
OnPositionChanged ( GeoPositionChangedEventArgs e ) : void

Processed the watcher GeoCoordinateWatcher.PositionChanged event.

OnStatusChanged ( GeoPositionStatusChangedEventArgs e ) : void

Processes the watcher GeoCoordinateWatcher.StatusChanged event.

Private Methods

Méthode Description
GeolocatorPositionChanged ( Geolocator sender, PositionChangedEventArgs args ) : void
GeolocatorStatusChanged ( Geolocator sender, StatusChangedEventArgs args ) : void
RaisePositionChangedEvent ( ) : void
ReportTimerTick ( object sender, EventArgs e ) : void

Method Details

GetPosition() public méthode

Retrieves the current location.
public GetPosition ( Exception>.Action locationResult ) : void
locationResult Exception>.Action The current location.
Résultat void

GetPosition() public méthode

Retrieves the current location.
public GetPosition ( LocationServiceAccuracy desiredAccuracy, Exception>.Action locationResult ) : void
desiredAccuracy LocationServiceAccuracy The desired accuracy.
locationResult Exception>.Action The current location.
Résultat void

GetPosition() public méthode

Retrieves the current location.
public GetPosition ( LocationServiceAccuracy desiredAccuracy, System.TimeSpan maximumAge, System.TimeSpan timeout, Exception>.Action locationResult ) : void
desiredAccuracy LocationServiceAccuracy The desired accuracy.
maximumAge System.TimeSpan The maximum acceptable age of cached location data.
timeout System.TimeSpan The timeout.
locationResult Exception>.Action The current location.
Résultat void

GetPosition() public méthode

Retrieves the current location.
public GetPosition ( TimeSpan maximumAge, TimeSpan timeout, Exception>.Action locationResult ) : void
maximumAge TimeSpan The maximum acceptable age of cached location data.
timeout TimeSpan The timeout.
locationResult Exception>.Action The current location.
Résultat void

GetPositionAsync() public méthode

Starts an asynchronous operation to retrieve the current location.
public GetPositionAsync ( ) : Task
Résultat Task

GetPositionAsync() public méthode

Starts an asynchronous operation to retrieve the current location.
public GetPositionAsync ( LocationServiceAccuracy desiredAccuracy ) : Task
desiredAccuracy LocationServiceAccuracy The desired accuracy.
Résultat Task

GetPositionAsync() public méthode

Starts an asynchronous operation to retrieve the current location.
public GetPositionAsync ( LocationServiceAccuracy desiredAccuracy, TimeSpan maximumAge, TimeSpan timeout ) : Task
desiredAccuracy LocationServiceAccuracy The desired accuracy.
maximumAge TimeSpan The maximum acceptable age of cached location data.
timeout TimeSpan The timeout.
Résultat Task

GetPositionAsync() public méthode

Starts an asynchronous operation to retrieve the current location.
public GetPositionAsync ( TimeSpan maximumAge, TimeSpan timeout ) : Task
maximumAge TimeSpan The maximum acceptable age of cached location data.
timeout TimeSpan The timeout.
Résultat Task

LocationService() public méthode

Initializes a new instance of the LocationService class.
public LocationService ( ) : System
Résultat System

OnPositionChanged() protected méthode

Processed the watcher GeoCoordinateWatcher.PositionChanged event.
protected OnPositionChanged ( GeoPositionChangedEventArgs e ) : void
e GeoPositionChangedEventArgs The instance containing the event data.
Résultat void

OnStatusChanged() protected méthode

Processes the watcher GeoCoordinateWatcher.StatusChanged event.
protected OnStatusChanged ( GeoPositionStatusChangedEventArgs e ) : void
e GeoPositionStatusChangedEventArgs The instance containing the event data.
Résultat void

Start() public méthode

Starts the acquisition of data from the location service.
public Start ( ) : void
Résultat void

Start() public méthode

Starts the acquisition of data from the location service.
public Start ( LocationServiceAccuracy desiredAccuracy ) : void
desiredAccuracy LocationServiceAccuracy The desired accuracy.
Résultat void

Start() public méthode

Starts the acquisition of data from the location service.
public Start ( int desiredAccuracyInMeters ) : void
desiredAccuracyInMeters int The desired accuracy in meters for data returned from the location service.
Résultat void

Stop() public méthode

Stops the acquisition of data from the location service.
public Stop ( ) : void
Résultat void