Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 825367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:14:37+00:00 2026-05-15T03:14:37+00:00

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

  • 0

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 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T03:14:37+00:00Added an answer on May 15, 2026 at 3:14 am

    I discovered that I wasn’t signing my files properly – now that I have, everything works fine.

    For kaban:

          // called when location object changes
      function locationCB()
      {
         alert("Latitude "  + blackberry.location.latitude);
         alert("Longitude " + blackberry.location.longitude);
         return true;
     }
     // test to see if the blackberry location API is supported
     if( window.blackberry && blackberry.location.GPSSupported)
     {
           document.write("GPS Supported");
    
           // Set our call back function
           blackberry.location.onLocationUpdate("locationCB()");
    
           // set to Autonomous mode
           blackberry.location.setAidMode(2);
    
           //refresh the location
           blackberry.location.refreshLocation();
     }
     else
     {
       document.write("This Device doesn't support the Blackberry Location API");
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to python and experimenting a bit but having trouble making a list
I'm experimenting by making a social network from scratch in PHP/MySQL, but I'm having
I am experimenting a little bit with gamestudio. I am now making a shooter
I'm making my first attempt at experimenting with Comet. I developed a very simple
I'm experimenting with MCV using jquery. I'm making a call to an api, which
I'm making a link and text service, but I have a problem, which is:
In the effort to learn more about applets and Java, I am experimenting making
I've been experimenting with making Facebook apps and I'm still not clear on app
I'm experimenting with pop-down menus (inside floating DIVs). Making them appear with onmouseover attributes
I've been experimenting with making a simple Python web crawler, and I'm using regular

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.