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

Represents an implementation of the ILocationService.
Inheritance: LocationServiceBase, ILocationService
Show file Open project: Cimbalino/Cimbalino-Phone-Toolkit

Public Methods

Method 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.

Protected Methods

Method Description
OnPositionChanged ( GeoPositionChangedEventArgs e ) : void

Processed the watcher GeoCoordinateWatcher.PositionChanged event.

OnStatusChanged ( GeoPositionStatusChangedEventArgs e ) : void

Processes the watcher GeoCoordinateWatcher.StatusChanged event.

Private Methods

Method 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 method

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

GetPosition() public method

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

GetPosition() public method

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.
return void

GetPosition() public method

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.
return void

GetPositionAsync() public method

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

GetPositionAsync() public method

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

GetPositionAsync() public method

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.
return Task

GetPositionAsync() public method

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.
return Task

LocationService() public method

Initializes a new instance of the LocationService class.
public LocationService ( ) : System
return System

OnPositionChanged() protected method

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

OnStatusChanged() protected method

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

Start() public method

Starts the acquisition of data from the location service.
public Start ( ) : void
return void

Start() public method

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

Start() public method

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.
return void

Stop() public method

Stops the acquisition of data from the location service.
public Stop ( ) : void
return void