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.

enableHighAccuracy

Summary

A request from the application to receive the best possible location results. The intended purpose of this attribute is to allow applications to inform the implementation that they do not require high accuracy geolocation fixes so the implementation can avoid using geolocation providers that consume a significant amount of power (e.g., GPS).

Property of apis/geolocation/PositionOptionsapis/geolocation/PositionOptions

Syntax

var result = PositionOptions.enableHighAccuracy;
PositionOptions.enableHighAccuracy = value;

Return Value

Returns an object of type BooleanBoolean

Default is false.

Examples

//Request the best possible geolocation fix
PositionOptions.enableHighAccuracy = true;

Related specifications

W3C Geolocation Specification
W3C Editor’s Draft

Attributions