Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
Nokia Asha web apps – W3C Geolocation API
This article explains how to use W3C Geolocation API in Nokia Asha Web Apps
Nokia Asha Web Apps version 1.5 supports "single-shot" location retrieval in correspondence to W3C Geolocation API . Device location is obtained by using network-based positioning, hence accuracy varies depending on a device features and network configuration in which device is used. Network based positioning offers fast location retrieval even in indoors, making it well suitable for Series 40 web apps.
Following features specified in W3C Geolocation API are not supported in the Nokia Asha Web Apps version 1.5:
- Repeated location updates, in other words location tracing is not supported. Hence watchPosition() and clearWatch() methods are not supported either.
- Position options attribute enableHighAccuracy is not supported.
- Following attributes of coordinates interface are not supported: altitudeAccuracy, speed and heading .
- Passing anonymous callback methods to getCurrentPosition()
- PositionError interface: err.TIMEOUT, err.PERMISSION_DENIED and err.POSITION_UNAVAILABLE are not defined. Instead, use directly numeric values.
// geolocation API is not available, handle the case here
* handle success here
* use: position.coords.latitude, position.coords.longitude
* position.coords.accuracy and position.timeStamp
* handle failure here
* use: error.code and error.message