Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Geolocation Accuracy and Cached Location Bug
Summary:There are two issues: 1. When calling startObserving or getCurrentPosition for the first time, _locationManager is not initialized and the accuracy value set in options is lost. 2. When using the cached location _lastLocationEvent, current timestamp retrieved by CFAbsoluteTimeGetCurrent() is from 2001, but the timestamp of the location is from 1970. In addition, the comparison between _lastLocationEvent[@"coords"][@"accuracy"] and options.accuracy is incorrect. Less value indicates more accurate location. Closes facebook#6198 Differential Revision: D3023786 Pulled By: nicklockwood fb-gh-sync-id: 869c0e34252470275bf99cf0e5861747247f1158 shipit-source-id: 869c0e34252470275bf99cf0e5861747247f1158
- Loading branch information