Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
rmbarnes
Posts: 9
Registered: ‎11-24-2008
My Device: Not Specified

Javascript location api

Hi,

 

I'm working on the mobile version of an existing website, and one of the features (if viewed on a BlackBerry) is a location based search (along the lines of 'find places near you'). This has been created using the BlackBerry's Javascript location API. This works for me on the test model I have (Blackberry 8100 I think), but I have to be outside, and not standing too close to any tall buildings, or it seems I can't get any satetlites for the GPS lookup. This feature does not work for the client on their test Blackberry, even though they assure me they have checked the option in the browser's menu to allow the javascript location api. Using differnt aid modes doesn't seem to make a difference for them.

 

Has any one else developed a website that makes use of the Blackberry GPS via it's javascript API? If so how well has this worked for you? Is the GPS hardware not up to much or am I doing something wrong?

Please use plain text.
New Developer
ttklf4
Posts: 43
Registered: ‎07-29-2008
My Device: Not Specified

Re: Javascript location api

Hello,

 

I have implemented the BlackBerry JavaScript Location API on my developer site.

 

For my experience the API only works if the user change the position otherwise the location API respective the GSP seems not to be activated and no coordinates are send. If confirmed the JavaScript location API is useless for location-based services because the user doesn't change his position.

Please use plain text.
New Developer
rmbarnes
Posts: 9
Registered: ‎11-24-2008
My Device: Not Specified

Re: Javascript location api

Hi,

 

I have seen your site already actually when looking at how other people have used the API.

 

The lat/long numbers your site gives seems to the same as you get if you just access these values rather than using blackberry.location.refreshLocation(); and setting a callback which gets exectued once the location has been refreshed. If I try doing this the API gives me coords even when indoors (the same as the coords your site gives me), but they are waaaay off.

 

When using  blackberry.location.refreshLocation() and a callback, I get accurate coords, but it is really unreliable in terms of whether I can get a decent satelite signal.

 

Robin

 

Please use plain text.