12-17-2011 10:55 AM
I've developed a web app that uses location detection, which works fine with Android, iPhone, and many desktop browsers; however, the latitude and longitude values are always returned as 0,0 on my blackberry. It is running OS 6 (it reports 184.108.40.2065). Initially I was using google gears (the geo.js script), but after googling for a while I learned that gears doesn't support OS 6 (it only supports up to OS 5). So after doing more research I learned that OS 6 should just work with the standard HTML5 Geolocation API. However, this does not appear to be the case for me. I tried the code shown on this page, but the latitude and longitude still returns as 0,0. http://supportforums.blackberry.com/t5/Web-and-Web
Any help is appreciated. Thanks.
12-17-2011 12:18 PM - edited 12-18-2011 11:58 AM
12-20-2011 10:03 AM
What type of app are you making? A browser app or a webworks app?
12-31-2011 09:52 AM
I can fix by editing geo.js. I swap the order of conditionals such that
'else if(typeof(window.blackberry)!=u && blackberry.location.GPSSupported)'
'else if (typeof(navigator.geolocation)!=u)'
Can anyone confirm that this is a safe fix? i.e. will it break other devices?
01-03-2012 02:31 PM
It should not break on other devices because you still have the undefined check first. But I'm quite surprised it doesn't work as is, since it does for me.