DefaultLocationValidator
public class DefaultLocationValidator : LocationValidator
DefaultLocationValidator is the default implementation of LocationValidator
.
The DefaultLocationValidator
class provides a default implementation for validating locations based on their
horizontal accuracy. If the accuracy is within an acceptable range, the location is considered valid (GPS fixed),
otherwise it is considered invalid (GPS not fixed).
-
Initializes a new instance of
DefaultLocationValidator
.Declaration
Swift
public init()
-
Validate location.
This method validates a given location by assessing its horizontal accuracy. If the accuracy falls within the defined maximum horizontal accuracy range, the GPS is classified as fixed; otherwise, it is considered non-fixed.
Declaration
Swift
public func checkLocation(_ location: CLLocation, provider: LocationEngineProviderType) -> GPSStatus
Parameters
location
The location to be checked.
provider
The source that provides the location.
Return Value
Indicates if GPS is fixed or not as a result of
LocationValidator