LocationUpdateValidator
public protocol LocationUpdateValidator
Defines the policy for validating incoming location updates.
The LocationUpdateValidator
protocol specifies a method for validating incoming location updates.
Implementations of this protocol can define custom validation logic to determine whether a new
location update is valid based on the provided new and last known locations.
-
Validates new location update.
This method validates a new location update by comparing it with the last known location.
Declaration
Swift
func isLocationValid(newLocation: GeoLocation, lastLocation: GeoLocation) -> Bool
Parameters
newLocation
The new location that needs to be validated.
lastLocation
The last known location to compare against.
Return Value
true
if the new location is valid, otherwisefalse
.