DefaultLocationProvider
public class DefaultLocationProvider
extension DefaultLocationProvider: LocationProvider
Returns user location in energy efficient approach.
Would not trigger Location Permission dialogs but will retrieve permission changes notification.
Suitable for SearchEngine for providing user location by default without additional efforts.
-
DefaultLocationProvider constructor with CLLocationManager
Declaration
Swift
public init(locationManager: CLLocationManager)Parameters
locationManagerCLLocationManager to use
-
Convenience DefaultLocationProvider constructor without CLLocationManager
Declaration
Swift
public convenience init( distanceFilter: CLLocationDistance = 100, desiredAccuracy: CLLocationAccuracy = kCLLocationAccuracyHundredMeters, activityType: CLActivityType = .other )Parameters
distanceFilterThe minimum distance (measured in meters) a device must move horizontally before an update event is generated.
desiredAccuracyThe accuracy of the location data.
activityTypeThe type of user activity associated with the location updates.
-
Device location for LocationProvider
Declaration
Swift
public func currentLocation() -> CLLocationCoordinate2D?Return Value
actual location
DefaultLocationProvider Class Reference