[AC-3246] Ti.Geolocation doesn't update the latitude and longitude fast enough
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | n/a |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2015-01-20T06:05:35.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | TCSupportTriage, accuracy, coordinates, geocoder, geolocation, realtime |
| Reporter | June Rockwell |
| Assignee | Mauro Parra-Miranda |
| Created | 2014-10-03T03:48:32.000+0000 |
| Updated | 2016-03-08T07:57:39.000+0000 |
Description
Ti.Geolocation doesn't update longitude and latitude. Sometimes I have to wait at least 50 seconds for it to update the coordinates and sometimes it takes a few minutes. I'd either drive continuously for a few feet and sometimes for a few miles or I'd be walking around my house which is a pretty big spacious house and geolocation doesn't update longitude and latitude until I wait at least 50 seconds.
This is the code:
https://gist.github.com/jhrockwell/a0b6e39d6832a36a0d8b
Hello, I have tested this issue and it's working fine. I get it to update to the coordinates within 10 - 15 seconds.
TESTING ENVIRONMENT
MacOS X 10.9.5, iPod iOS 8.0 Mobile SDK: 3.4.0.GACODE SAMPLE
tiapp.xml
<ios> <plist> <dict> <key>NSLocationAlwaysUsageDescription</key> <string> Specify the reason for accessing the user’s location information. This appears in the alert dialog when asking the user for permission to access their location. </string> </dict> </plist> </ios>app.js
Also i checked the KitchenSink sample. It's working fine too, Thanks.if (Ti.Geolocation.locationServicesEnabled) { Ti.Geolocation.purpose = 'Get Current Location'; Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST; Ti.Geolocation.distanceFilter = 10; Ti.Geolocation.preferredProvider = Ti.Geolocation.PROVIDER_GPS; Ti.Geolocation.addEventListener('location', function(e) { if (e.error) { alert('Error: ' + e.error); } else { alert("Lat: " + e.coords.latitude + ";\nlong: "+ e.coords.longitude); } }); } else { alert('Please enable location services'); }Hello [~jhrockwell]! Can you please take a look into the posted test case and report back if it works for you? Thanks a lot! Best Regards!