LocationProviderControls
How the location contract scripts a provider. A real adapter implements
these by mocking navigator.geolocation.
This is an interface exported by @mapcairn/core/contracts, checked against version 0.2.0.
Signature
import type { LocationProviderControls } from "@mapcairn/core/contracts";
interface LocationProviderControls
Methods
emitError
emitError(kind: LocationErrorKind): void;
Delivers an error of this kind to the active watch. Used only when supportsWatch.
kind(LocationErrorKind)
emitFix
emitFix(fix: LocationFix): void;
Delivers a fix to the active watch. Used only when supportsWatch.
fix(LocationFix)
hold
hold(): void;
Keeps the next locate pending until its signal aborts.
willFail
willFail(kind: LocationErrorKind): void;
Makes every later locate fail the way kind describes.
kind(LocationErrorKind)
willFix
willFix(fix: LocationFix): void;
Makes every later locate resolve with this fix.
fix(LocationFix)
See also
Source: packages/core/src/contracts/locationProvider.contract.ts:15