HTML5 Geolocation


This sample uses HTML5 syntax to retieve, process and display geographic information about the users current location.

Note: In order to retrieve GPS info from a WebWorks application running on the BlackBerry Tablet OS, the following permission must be defined in the config.xml file:


Through the use of the html5_init.js toolkit, both BlackBerry Device Software 5.0 and BlackBerry 6 will support this application. The toolkit translates HTML5 geolocation syntax into Gears geolocation when run on 5.0 to allow the code to run without needing to be recompiled.

Prior to HTML5 Geolocation support, the BlackBerry browser engine supplied its own GPS feature. For a demo of this behavior, load the following page on a BlackBerry Smartphone running OS 4.2 - 5.0 : BlackBerry Browser GPS support.