Not TestedTesting not done, may not work properly
Device & Sensors

Geolocation API

Retrieve device geographical location coordinates (latitude, longitude, accuracy).

Checking support...
Advertisement

Interactive Input Workspace

Ready for input

Web API Execution Output

Result output will be displayed here after processing...

Native JavaScript Code Example (Zero Libraries)

navigator.geolocation.getCurrentPosition((pos) => {
  console.log(pos.coords.latitude, pos.coords.longitude);
});

About the Geolocation API Web API

Geolocation API allows the user to provide their location to web applications.

Specification:W3C & WHATWG Web API Standard
Sponsored Content