Skip to content

Conversation

zevero
Copy link

@zevero zevero commented Sep 5, 2015

Thank you for your nice library. I was implementing roughly the same ideas, but it is much cleaner doing it by extending navigator.geolocation than polluting my proper code...

I wanted to make some improvements however:

  1. Use bestCheckedPostion instead of lastCheckedPosition,
  2. Always call geoprogress (also the last one)
  3. Dont force maximumAge. Can be set optionally
  4. New Option countMin, which is defaulted to 2 (exactly as it was)
  5. Check Options with isNaN() to allow for 0 (would be overwritten otherwise)
  6. New Option enableLowAccuracyOnTimeout (calls getCurrentPosition with lowAccuracy doubling timeout)
  7. New Option desiredAccuracyCountMin, so we can wait just a little bit longer for an even better result (maxWait is unaffected)

Everything is backwards compatible but

  • not lastCheckedPosition but bestCheckedPosition is returned
  • geoprogress is called one more time (along with the result)

@zevero
Copy link
Author

zevero commented Sep 11, 2015

I replaced enabelLowAccuracyOnTimeout by enableLowAccuracy, which starts a low accuracy getCurrentPosition simultaneously.
However, this idea is at least not honored on Lollipop and Chrome 43.

http://stackoverflow.com/questions/17804469/html5-geolocation-ignores-enablehighaccuracy-option/32521789

Its a pitty, because instead of returning no position at all I would have liked at least the roughest idea of the position...

Maybe someone has a better idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant