I've been reading through a lot of questions/answers relating to the simulation of location on the iOS simulators, but none touching on my specific issue. I have a prototype of a location aware application which I configured to use a GPX file as described in this answer: How to solve Xcode 4.1 (LION) GPS error?
It works great and it provides all the information I need, with one exception. I was expecting the location updates to stop as soon as we moved into the last position defined in the GPX file. Instead, the current location keeps updating in a loop. It returns to the starting position, and loops until you stop it.
I've tried marking positions around the area where I want it to linger at, but it ignores them. It could have something to do with the minimum change in position, but it just ignores it and continues with the loop.
Created a quick project to illustrate the issue and loaded it to GitHub: https://github.com/acolchado/LocationPrototype
To reproduce follow these steps:
Load the project in xcode, I created it using xcode 4.4.1.
Run the project.
From the debug panel, locate the location arrow. Click on the arrow and select "SanBruno_To_Downtown_SF" from the context menu.
Bring the simulator to the foreground and observe the endless loop.
I have looked everywhere for a solution for this, but I am unable to find any mention of the loop. I would greatly appreciate any help anyone could offer here.
Thanks,
Agustin
1) Open finder project and paste the GPX file in route directory. 2) Add that file in your project. 4) Start the simulation through GPX data.
Open your phone's Settings app. Under "Personal," tap Location access. At the top of the screen, turn Access to my location on or off.
my cheat:
just copy paste the last waypoint in your .gpx file a bunch of times (enough to keep it stuck there until it satisfies your criteria)
You can also add a timestamp in the gpx file. Make yourself linger at the last stop by having a really long timestamp.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With