Android web dev mess: geolocation.getCurrentPosition stack overflow
It turns out that unless you supply an options hash as the third parameter to geolocation.getCurrentPosition
, it causes a stack overflow on Android 2.3-4.2.
This call causes a stack overflow on Android but works on iOS:
navigator.geolocation.getCurrentPosition callback(@goToUserLocation),
callback(@handlePositionError)
This, on the other hand, is going to work:
navigator.geolocation.getCurrentPosition callback(@goToUserLocation),
callback(@handlePositionError),
{timeout: 10000, enableHighAccuracy: true}
This is despite the options
argument being optional, of course.