| // BlackBerry Geolocation. Tested w/ 4.6.0.297. | |
| // http://docs.blackberry.com/en/developers/deliverables/1143/browser_devguide.pdf | |
| if (window.blackberry && blackberry.location && blackberry.location.GPSSupported) { | |
| var AUTONOMOUS_AID_MODE = 2; | |
| function win() { | |
| clearTimeout(failTimeoutId); | |
| blackberry.location.removeLocationUpdate(win); | |
| alert(blackberry.location.latitude + " : " + blackberry.location.longitude); | |
| } | |
| function fail() { | |
| blackberry.location.removeLocationUpdate(win); | |
| alert("Couldn't find your location."); | |
| } | |
| blackberry.location.onLocationUpdate(win); | |
| blackberry.location.setAidMode(AUTONOMOUS_AID_MODE); | |
| blackberry.location.refreshLocation(); | |
| var failTimeoutId = setTimeout(fail, 1000*30); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment