| CARVIEW |
Select Language
HTTP/2 301
server: GitHub.com
content-type: text/html
location: https://webplatform.github.io/docs/apis/geolocation/
access-control-allow-origin: *
expires: Sun, 28 Dec 2025 06:34:11 GMT
cache-control: max-age=600
x-proxy-cache: MISS
x-github-request-id: 9D46:2118F1:7402C3:821457:6950CD06
accept-ranges: bytes
age: 0
date: Sun, 28 Dec 2025 06:24:12 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210042-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1766903052.820975,VS0,VE201
vary: Accept-Encoding
x-fastly-request-id: 09d6ce5c5a9605e5319f26be130535a15d05f952
content-length: 162
HTTP/2 200
server: GitHub.com
content-type: text/html; charset=utf-8
last-modified: Thu, 09 Jan 2020 08:57:10 GMT
access-control-allow-origin: *
etag: W/"5e16eae6-1835"
expires: Sun, 28 Dec 2025 06:34:12 GMT
cache-control: max-age=600
content-encoding: gzip
x-proxy-cache: MISS
x-github-request-id: 2F81:2118F1:7402CA:82145A:6950CD0B
accept-ranges: bytes
age: 0
date: Sun, 28 Dec 2025 06:24:12 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210042-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1766903052.040803,VS0,VE204
vary: Accept-Encoding
x-fastly-request-id: f37a5f209bb78db2757f1fde2b979562d6cdfe27
content-length: 2201
Geolocation API ยท WebPlatform Docs
This page is Ready to Use
Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.
Geolocation API
Summary
The geolocation API lets you share your location with trusted web sites. The latitude and longitude are available to JavaScript on the page, which in turn can send it back to the remote web server and do fancy location-aware things like finding local businesses or showing your location on a map.
- Coordinates
- The geographic coordinate reference system used by the attributes in this interface is the World Geodetic System (2d).
- Geolocation
- The Geolocation object is used by scripts to programmatically determine the location information associated with the hosting device. The location information is acquired by applying a user-agent specific algorithm, creating a Position object, and populating that object with appropriate data accordingly.
- PositionError
- The container for Position error information returned by this API.
- PositionOptions
- A native script object used by the getCurrentPosition() and watchPosition() methods.
Attributions
Microsoft Developer Network: Windows Internet Explorer API reference Article