private void OnPositionError(PositionErrorEventArgs e) { StopListening(); var error = PositionError; if (error != null) { error(this, e); } }
private void OnListeningError(object sender, PositionErrorEventArgs e) { switch (e.Error) { case GeolocationError.PositionUnavailable: CurrentLocation.IsResolved = false; CurrentLocation.Status = XPositionStatus.NotAvailble; _fire(); break; case GeolocationError.Unauthorized: CurrentLocation.IsResolved = false; CurrentLocation.IsEnabled = false; CurrentLocation.Status = XPositionStatus.Disabled; _fire(); break; default: CurrentLocation.IsResolved = false; CurrentLocation.Status = XPositionStatus.NotInitialized; _fire(); break; } }