Blackberry.location API not working correctly

Posted by chibineku on Stack Overflow See other posts from Stack Overflow or by chibineku
Published on 2010-05-20T16:58:49Z Indexed on 2010/05/20 17:00 UTC
Read the original article Hit count: 532

I am experimenting with making Blackberry widgets but having a little trouble.

My first trial involves displaying a button which, when clicked, calls a JavaScript function that should alert the phones latitude and longitude.

The function looks:

function whereAmI() {
var latitude = blackberry.location.latitude;
var longitude = blackberry.location.longitude;
alert("Lat: "+latitude+", Long: "+longitude);
}

But it only ever alerts "Lat: 0, Long: 0". I've checked and my GPS seems to be working ok.

I'm running OS 5.* on a Curve 8900.

Any help would be appreciated :)

© Stack Overflow or respective owner

Related posts about blackberry-widgets

Related posts about blackberry