Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите сделать эту работу!
Вы можете также прочитать эту статью на English (US).
Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The Position interface represents the position of the concerned device at a given time. The position, represented by a Coordinates object, comprehends the 2D position of the device, on a spheroid representing the Earth, but also its altitude and its speed.
Properties
The Position interface doesn't inherit any property.
Position.coordsRead only Secure context- Returns a
Coordinatesobject defining the current location. Position.timestampRead only Secure context- Returns a
DOMTimeStamprepresenting the time at which the location was retrieved.
Methods
The Position interface neither implements, nor inherit any method.
Specifications
| Specification | Status | Comment |
|---|---|---|
| Geolocation API The definition of 'Position' in that specification. |
Recommendation | Initial specification. |
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Position | Chrome Full support 5 | Edge Full support Yes | Firefox Full support 3.5 | IE Full support 9 | Opera Full support 16 | Safari Full support 5 | WebView Android Full support Yes | Chrome Android Full support 18 | Firefox Android Full support 4 | Opera Android Full support 16 | Safari iOS Full support Yes | Samsung Internet Android ? |
| Secure context required | Chrome Full support 47 | Edge Full support Yes | Firefox Full support 55 | IE No support No | Opera Full support Yes | Safari Full support Yes | WebView Android Full support 47 | Chrome Android Full support 47 | Firefox Android Full support 55 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android ? |
timestamp | Chrome Full support 5 | Edge Full support 12 | Firefox Full support 3.5 | IE Full support 9 | Opera Full support 16 | Safari Full support 5 | WebView Android Full support Yes | Chrome Android Full support 18 | Firefox Android Full support 4 | Opera Android Full support 16 | Safari iOS Full support Yes | Samsung Internet Android ? |
coords | Chrome Full support 5 | Edge Full support 12 | Firefox Full support 3.5 | IE Full support 9 | Opera Full support 16 | Safari Full support 5 | WebView Android Full support Yes | Chrome Android Full support 18 | Firefox Android Full support 4 | Opera Android Full support 16 | Safari iOS Full support Yes | Samsung Internet Android ? |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
See also
- Using geolocation
- The
Geolocationinterface that use it.