Wait for the geolocation coordinates to match one of the supplied matchers.
Watches the geolocation position with the Geolocation API supplied to createGeolocationObserver and resolves when coordinates are acquired that match one of the supplied matchers.
The acquired coordinates must match all properties of at least one supplied matcher in order to be considered a match. If no matchers are supplied, then any acquired coordinates will be considered a match.
Optional
matcherOrMatchers: The matcher(s) to match against.
Optional
task: () => Promise<void>An optional task to execute while waiting for the acquired coordinates to match. You can use this to guarantee that certain actions are performed after observation has started.
Optional
positionOptions: PositionOptionsThe options to pass to Geolocation.watchPosition.
A promise that resolves when coordinates are acquired that match one of the matchers.
Wait for the geolocation permission state to change to one of the specified states.
The desired permission state(s).
Optional
task: () => Promise<void>An optional task to execute while waiting for the state change. You can use this to guarantee that certain actions are performed after observation has started.
A promise that resolves when the geolocation permission state matches one of the desired states. If the state is already one of the desired states, the promise resolves immediately.
A TypeError if no states are provided.
Wait for the geolocation position error to match one of the supplied GeolocationPositionError.code codes.
Watches the geolocation position with the Geolocation API supplied to createGeolocationObserver and resolves when a position error is received that has a code that is one of the supplied codes.
If no codes are supplied, then any received position error will be considered a match.
Optional
codeOrCodes: GeolocationPositionErrorCode | GeolocationPositionErrorCode[]The GeolocationPositionError.code code(s) to match against.
Optional
task: () => Promise<void>An optional task to execute while waiting for the received position error to match. You can use this to guarantee that certain actions are performed after observation has started.
Optional
positionOptions: PositionOptionsThe options to pass to Geolocation.watchPosition.
A promise that resolves when a position error is received that has a code that is one of the supplied codes.
An observer for geolocation changes.