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.

alititudeAccuracy

Summary

Denotes the accuracy level of the altitude coordinate, specified in meters. 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.alititudeAccuracy;

Return Value

Returns an object of type NumberNumber

Examples

//Assuming the variable altitude_accuracy_threshold has been set
if (position.coords.altitudeAccuracy < altitude_accuracy_threshold) {
   // The altitude position is relatively accurate.
   } else {
   // The altitude position is potentially inaccurate.
   }

Related specifications

W3C Geolocation Specification
W3C Editor’s Draft

Attributions