GeolocationPosition

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

* Some parts of this feature may have varying levels of support.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Интерфейс GeolocationPosition представляет положение соответствующего устройства в данный момент времени. Положение, представленное объектом GeolocationCoordinates, отражает двумерное положение устройства на сфероиде, представляющем землю, а также его высоту и скорость..

Свойства

Интерфейс GeolocationPosition не наследует свойства.

GeolocationPosition.coords Только для чтения Secure context

Возвращает объект GeolocationCoordinates определяющий текущую локацию.

GeolocationPosition.timestamp Только для чтения Secure context

Возвращает DOMTimeStamp, представляющий время, в которое была получена локация.

Методы

Интерфейс GeolocationPosition не имеет и не наследует методы.

Спецификации

Specification
Geolocation
# position_interface

Совместимость с браузерами

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
GeolocationPosition
coords
Secure context required
timestamp
toJSON

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Uses a non-standard name.
Has more compatibility info.

Смотрите также