Browser
Last updated
Was this helpful?
Last updated
Was this helpful?
Compass supports with the compass-geolocation-browser
artifact. The artifact supports JS and WASM targets.
Geolocation in the browser requires the user to provide permission. This is handled automatically when you start tracking or attempt to get the current location.
Follow these steps to create a Geolocator
Geolocator is powered by the Locator
object:
Then you can use that to create the Geolocator
object:
Or you can use an extension function to skip the Locator
step:
Nothing extra is required to setup permissions for the browser.
When you attempt to get the location, the browser will show a prompt to the user. They can allow, deny, or do one of those permanently.
Now you can follow the steps in Geolocator