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
Contributor
cgishack
Posts: 12
Registered: ‎03-20-2011
My Device: 9800

Simple Location question

I thought this would be easy, but I am not having any luck.

I am simply trying to get the lat/log of a similated GPS point (already added into my simulator)

 

I am using the BB 9800 Tourch (v6.0.0.337) simulator and I get nothing...

Using the 9550 simulator I do get the lat/long..

 

Any help would be apprecited to get this working in the 9800.

 

My code is as follows.

 

[code]

function onLocateMeClick()
{
    if( window.blackberry && blackberry.location.GPSSupported)
    {
        //alert("GPS Supported");
        blackberry.location.onLocationUpdate(locationCB);
        blackberry.location.setAidMode(2);
        blackberry.location.refreshLocation();
    }
    else
    {
        alert("GPS NOT Supported");
    }
 
}
function locationCB()
{
 
    alert("Latitude "  + blackberry.location.latitude);
    alert("Longitude " + blackberry.location.longitude);
}

[/code]

 

It's touch to debug because from my understanding the 9800 does not have debugging capabilities.

 

Drew