Just found out that more recent web browsers requires a SSL-secured (HTTPS) site to host the target script before navigator.geolocation.getCurrentPosition() will work. Otherwise, the following error will be emitted:
Back to the drawing board...
getCurrentPosition() and watchPosition() are deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See goo.gl/rStTGz for more details.This creates a problem for the original ESPCLOCK code. Since WifiManager does not support hosting a HTTPS captive portal, the logic for capturing the user's geolocation (and hence the timezone) no longer works.
Back to the drawing board...
Yeah I just realized this too .. makes it hard for embedded devices now since managing SSL is not going to be easy on embedded devices :(
ReplyDelete