03-25-2009 03:59 PM
Hello,
you have to enable JavaScript and JavaScript Location Support in the options menu.
03-25-2009 04:01 PM
I just realized that I also had to enable GPS in the general device options in addition to the Browser options.
Thanks!
02-23-2011 01:20 AM
hi
i implement the javaScript for latitude and long for the device
i always get you are in 0 lat and 0 longitude.
i tried this on many device but it always give 0,0 value
follwing is code snippet of my lat-lon find java script
code for script
12-18-2011 09:42 AM
Thanks for that last post. I have a Blackberry curve ( App Version: 6.0.0.415 (1659) ) and until reading that post I've been unsuccessful at getting location detection to work. Everything that I've tried (except for your post) returns 0,0 for the latitude and longitude. My goal is to get location detection working on every device that I can for my web app. I seem to have it working fine on everything except for Blackberry.
One question I have is how do I remove the location handler? This code is not working, as I never see the 'location handler removed' message.
<html>
<body>
<script language="Javascript">
function removeLocation() {
// dummy function since removeLocationUpdate requires a callback
window.alert("location handler removed");
}
function getLocation() {
window.alert("Your new position is " + blackberry.location.latitude + " degrees latitude and " + blackberry.location.longitude + " degrees longitude.");
blackberry.location.removeLocationUpdate(removeLoc
}
if(blackberry.location.GPSSupported) {
blackberry.location.setAidMode(1);
blackberry.location.refreshLocation();
blackberry.location.onLocationUpdate(getLocation);
} else {
alert('nope');
}
</script>
<p>detecting location....</p>
</body>
</html>
By the way these exampls return 0,0 for the latitude and longitude:
http://code.google.com/p/geo-location-javascript/
12-19-2011 09:40 AM
For developers using 5.0+ in a webworks app, or 6.0+ in a browser app you should simply be able to use HTML5 Geolocation
button below the post(s)12-20-2011 08:56 AM
That example does not work for me. Please see my post here: