JS error handling issue

Have an issue with some android tablets that probably are blocking access to GPS location.
I have a function that sets the spinner flag to 1, reads the GPS, calculates a map and then sets the flag to 0 (to hide the spinner).
Seems that when the JS function can’t complete the GPS reading it doesn’t continue and therefore the spinner never clears.
Has anyone come across this or knows how to handle the JS function so that it will continue running.?


I am sure you can trap for the error.
If you are using the code from the example, we can update it on a call if you’d like?

General Idea is to see what error is throw when GPS access is denied, and trap for that…