bmoren / p5.geolocation

a geolocation and geofencing library for p5.js
GNU Lesser General Public License v2.1
90 stars 27 forks source link

geolocation denied (preload issue) #2

Closed Zaptronic closed 5 years ago

Zaptronic commented 8 years ago

I put the getCurrentPosition() function in the preload function in my sketch. When the user denies geolocation in the browser it never leaves the preload function. The geocheck function will never fire since it won't reach the setup functionality. I also tried the error callback function but it still doesn't leave the preload function. Am I doing something wrong?

bmoren commented 8 years ago

I didn't build in a way to handle this, I will look into it. In the mean time, I suggest using getCurrentPosition with a callback : https://github.com/bmoren/p5.geolocation#getcurrentposition-used-with-a-callback

Zaptronic commented 8 years ago

Thanks, I will try that.