For some reason suddenly when calling navigator.geolocation.getCurrentPosition()
I get this error:
Network location provider at 'https://www.googleapis.com/' : Returned error code 403.
It used to work perfectly yesterday! Could there be anything with their servers??
I had the same issue, you have to check your developer dashboard and make sure that your API key has no usage restrictions or warnings.
This happens for me too on idoco.github.io/map-chat
I suspect that this is related the the changes google planed for Deprecating Powerful Features on Insecure Origins it seems that some changes were done in the last few days in this chromium Issue 520765: Deprecation and removal of powerful features on insecure origins
Can you test your site over https to confirm that?
In the meanwhile I found this api usage as a workaround on this repo:
It appears it is back up now. But before I realized it was working, I used another way to get location data as recommended by another user on reddit.com
Source: https://www.reddit.com/r/webdev/comments/3j8ipj/anyone_else_had_issues_with_the_html5_geolocation/
It's not the HTTPS thing, even google's own examples fail, see https://developers.google.com/maps/documentation/javascript/examples/map-geolocation
I opened a thread on reddit and to find out more and got linked here: https://www.reddit.com/r/webdev/comments/3j8ipj/anyone_else_had_issues_with_the_html5_geolocation/
I've had people all over the world report the same issue.