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 8469955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:22:36+00:00 2026-06-10T16:22:36+00:00

I have a problem with Ti.Geolocation that drives me crazy. Only using IOS platform

  • 0

I have a problem with Ti.Geolocation that drives me crazy. Only using IOS platform so far. The goal is to get GPS callbacks with highest possible accuracy when I move around with the phone.

The problem is that I have copied most of the code from geolocation.js in KitchenSink, with the relevant part shown below. It looks OK to me, however the behaviour I get is very strange.

I just don’t get regular GPS callbacks when I walk around! The compass works fine however and sends me callbacks all the time. I have also tried without subscribing to ‘heading’ events, but no change in GPS behaviour.

There is only one event that can trigger a GPS-callback with correct data, and that is running KitchenSink! Switching to KitchenSink and back also gives me a callback with accuracy between 5 and 10. If I don’t do that, my accuracy can be as high as 1500-2500 (if I get a callback at all, that is).

KitchenSink seems to work fine, but I fail to see what that app does that I do not?!?

I have turned off Wifi in the phone so it wont disturb. This problem is very frustrating and I have spent three days on it now, can someone please help? I have tried compiling against different SDK’s too (normally 2.1.1GA but also down to 1.8.2). No change.

if (locationServicesAvailable()) {
    // APPLICATION LOGIC
    ui.init();

    Ti.Geolocation.purpose = "Get Lat/Long of your current position";
    Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST;

    Ti.Geolocation.distanceFilter = 10;
    Ti.Geolocation.frequency = 0; /* as fast as possible */
    Ti.Geolocation.preferredProvider = Ti.Geolocation.PROVIDER_GPS;

    if (Ti.Geolocation.hasCompass) {
        //  TURN OFF ANNOYING COMPASS INTERFERENCE MESSAGE
        Ti.Geolocation.showCalibration = false;
        // SET THE HEADING FILTER (THIS IS IN DEGREES OF ANGLE CHANGE)
        // EVENT WON'T FIRE UNLESS ANGLE CHANGE EXCEEDS THIS VALUE
        Ti.Geolocation.headingFilter = 45;
        /*
        Ti.Geolocation.getCurrentHeading(handleCompass);
        Ti.Geolocation.addEventListener('heading', handleCompass);
        */
    }

    Ti.Geolocation.getCurrentPosition(handlePosition);
    Ti.Geolocation.addEventListener('location', handlePosition);

    ui.refresh.addEventListener('click', function(e) {
        Ti.Geolocation.getCurrentPosition(handlePosition);  
    });
}
  • 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-06-10T16:22:38+00:00Added an answer on June 10, 2026 at 4:22 pm

    OK it seems I have found an answer to my problem. It’s as simple as setting accuracy to Ti.Geolocation.ACCURACY_NEAREST_TEN_METERS. I’m using the IOS platform, and I’m located in Sweden (in the countryside) if it matters. Don’t know if this solution applies to everyone, but I have seen references to this problem (http://developer.appcelerator.com/question/130596/strange-behavior-of-the-gps) and solution so I know it exists.

    No idea why ACCURACY_BEST doesnt work, but it doesnt for me. I’ll test all the other settings too when I get the time but now at least I can continue developing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem with my query on C, I’m using the oci8 driver. This
I have a serious problem that i have been trying to debug for a
I have a site with content that is searchable using a search bar that
I have several pages that access my data-base directly and get values from a
I have a strange problem with my iPhone app. I use geolocation and push
I have problem with implementing Rich Text Editor (all that i tried, e.g. TinyMCE).
I have a problem that has been effectively reduced to a Travelling Salesman Problem
G'day, We have a Perl script that is processing geolocation requests from the head-end
Original goal: I have a TreeMenu that i use to display my Menu. In
I followed this tutorial http://www.mobiledevelopersolutions.com/home/start/twominutetutorials/tmt4part1 and i have one problem. The geolocation doesn't work

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.