altitude
Summary
Denotes the height of the position, specified in meters above the ellipsoid. If the implementation cannot provide altitude information, the value of this attribute must be null.
Property of apis/geolocation/Coordinatesapis/geolocation/Coordinates
Syntax
Note: This property is read-only.
var result = Coordinates.altitude;
Return Value
Returns an object of type NumberNumber
Examples
if (position.coords.altitude <= 2) {
// at ground level
} else {
// above ground level
}
Related specifications
- W3C Geolocation Specification
- W3C Editor’s Draft
Attributions
Microsoft Developer Network: Windows Internet Explorer API reference Article