The top level Geolocation module. The Geolocation module is used for accessing device location based information.
| Name | Description |
|---|---|
| addEventListener | add an event listener for the instance to receive view triggered events |
| fireEvent | fire a synthesized event to the views listener |
| removeEventListener | remove a previously added event listener |
| setShowCalibration | configure the calibration UI. set the false to disable the calibration display. |
| Name | Type | Description |
|---|---|---|
| ACCURACY_BEST | int | accuracy constant |
| ACCURACY_HUNDRED_METERS | int | accuracy constant |
| ACCURACY_KILOMETER | int | accuracy constant |
| ACCURACY_NEAREST_TEN_METERS | int | accuracy constant |
| ACCURACY_THREE_KILOMETERS | int | accuracy constant |
| PROVIDER_GPS | string | The GPS location provider |
| PROVIDER_NETWORK | string | The Network location provider |
| locationServicesEnabled | boolean | returns true if the user has enabled or disable location services for the device (not the application). |
| preferredProvider | string | allows setting of the preferred location provider. Returns undefined when the preferred provider is auto-detected |
| purpose | string | (iOS only). This property informs the end-user why location services are being requested by the application. This string will be display in the permission dialog. This property is REQUIRED starting in 4.0. |
| showCalibration | boolean | returns true if the calibration UI can show |
| Name | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| calibration |
fired only on iPhone/iPad when the device detects interface and requires calibration. when this event is fired, the calibration UI is being displayed to the end user. Event properties
|
||||||||||
| heading |
fired when a heading event is received Event properties
|
||||||||||
| location |
fired when a location event is received Event properties
|