Skip to content

Geolocation API

The Geolocation API provides access to the user’s geographical location through the browser.

getCurrentPosition() for one-time location, watchPosition() for continuous updates. Requires user permission (HTTPS). Returns latitude, longitude, accuracy.