HTML5 PositionOptions
The PositionOptions represented a native objects with optional properties named enableHighAccuracy, timeout and maximumAge to use in navigator.geolocation.getCurrentPosition or navigator.geolocation.watchPosition.
Learning Resources:
Sample - Using HTML5 Geolocation Sample that demonstrates how to use the HTML5 Geolocation API [BlackBerry Developer Resource Center]. |
How To - Enable GPS on PlayBook How to enable GPS capability when using the BlackBerry WebWorks SDK for Tablet OS [BlackBerry Developer Resource Center]. |
Supported Platform(s)
- BlackBerry OS 5.0+ |
- BlackBerry PlayBook 1.0+ |
- BlackBerry 10 |
- Ripple Emulator |
API | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
---|---|---|---|---|---|---|---|
enableHighAccuracy | Y | Y | Y | Y | Y | Y | Y |
maximumAge | Y | Y | Y | Y | Y | Y | Y |
timeout | Y | Y | Y | Y | Y | Y | Y |
Configuration Document Settings
To use all of the API described for this object, you must ensure the following settings are in your configuration document: |
This API does not require a <feature> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
Permission Elements (PlayBook and BlackBerry 10+) |
---|
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
Properties
Boolean | enableHighAccuracy |
Number | maximumAge |
Number | timeout |
Properties
Boolean
enableHighAccuracy
The enableHighAccuracy attribute provides a hint that the application would like to receive the best possible results. This may result in slower response times or increased power consumption. The user might also deny this capability, or the device might not be able to provide more accurate results than if the flag wasn't specified. The intended purpose of this attribute is to allow applications to inform the implementation that they do not require high accuracy geolocation fixes and, therefore, the implementation can avoid using geolocation providers that consume a significant amount of power (e.g. GPS). This is especially useful for applications running on battery-powered devices, such as mobile phones.
Supported Platforms | |
---|---|
- BlackBerry OS 5.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |