DanijelHuis / HDAugmentedReality

Augmented Reality component for iOS, written in Swift.
MIT License
480 stars 97 forks source link

Annotations won't show if GPS positioning accuracy isn't good enough #9

Closed Aeroporas closed 8 years ago

Aeroporas commented 8 years ago

Hi Daniel!

Just run into an issue while playing with Demo Project and it took me some time to find out the reason of the following problem: annotations in AR mode won't show if GPS positioning accuracy isn't good enough, although you can still see them appearing on the map. I thought it would be nice to implement in the demo some kind of a notification popup or whatsoever, explaining this behavior. Anyway, thank you very much for sharing such a great solution!

DanijelHuis commented 8 years ago

Hi,

User location must have accuracy <500m, otherwise it won't use it and won't be able to determine relative annotation positions. It shows annotations on the map because user location is not important when viewing them on map.

When location is disregarded, message is logged: print("Disregarding location: age: (age), ha: (location.horizontalAccuracy)")

Regarding notification, I could add method to delegate that is thrown every 30sec if location is not found, this way user can decide whether to quit or wait a little more for the device to acquire GPS location.

Thank you for your suggestion.

DanijelHuis commented 8 years ago

Added onDidFailToFindLocation to ARViewController, it is called every 5 sec if location is not found.

Also added usage example to demo project.