Open tstefanich opened 8 years ago
Perhaps we can add an attribute to turn on a visual warning / error message that can be toggled on or off with a attribute to geoCheck().
geoCheck(true) //display custom browser based comparability messages
Or we could make a more universal geoError() which could be hooked into everything that has a visual message. I might make the argument for letting the user handle the visual side of things in case they want something more custom than what we would provide. Thoughts?
+1 for letting the user decide how to display errors. I would probably remove all console.log()
calls and either return the error to an error callback function or throw a proper error like p5.js core does, example: https://github.com/processing/p5.js/blob/master/src/color/p5.Color.js#L594
I mean I figured it out pretty easily.... but I feel like someone with less web experience, especially with mobile, or a semi beginner programmer could use a more explicit message...
It just seems like overkill to set up remote console logging, which is not that hard but I haven't needed to do this myself very often in work that I have done, to get a console message from the device that is "Check and make sure location services are turned at in Settings->Safari->Location Services ect ect"
So I guess its a question for a novice web developer what should we do to make this more clear if anything? A few thoughts below
Thoughts??
On Sun, Jun 26, 2016 at 2:41 PM, Ben Moren notifications@github.com wrote:
Or we could make a more universal geoError() which could be hooked into everything that has a visual message. I might make the argument for letting the user handle the visual side of things in case they want something more custom than what we would provide. Thoughts?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bmoren/p5.geolocation/issues/5#issuecomment-228624674, or mute the thread https://github.com/notifications/unsubscribe/AAxe5yOw--bT0q50BwBetilxFWz61Xbhks5qPvHxgaJpZM4I-nzs .
Tyler Stefanich http://www.tylerstefanich.com
I agree that remote logging is a huge pain. Anything we can do to get around that would be ideal. To your thoughts, yes, lets do all 3. I think this is the simplest way around for novice developers. We can make a catchall error function which throws a visible alert which can be toggled on/off which is enabled by default. If on, visible alert is shown in addition to a p5 style error thrown, if off, the error as derek pointed out above is thrown only.
When testing on ios 9 and if the users Settings -> Privacy -> Location services -> Safari are set to "Never" the webpage will not prompt for permission. There should maybe be a more explicit alert that notifies vs a console log. Will look into testing to see if we can do something more direct for ios / mobile.