Chrome navigator.geolocation.getCurrentPosition()错误403 [英] Chrome navigator.geolocation.getCurrentPosition() error 403
问题描述
出于某种原因,突然调用 navigator.geolocation.getCurrentPosition()
时出现此错误:
位于https://www.googleapis.com/的网络位置提供者:返回错误代码403。
它曾经昨天完美地工作!他们的服务器可以有任何东西吗?
现在看来它已经备份了。但在我意识到它正在工作之前,我使用另一种方式获取位于reddit.com上的其他用户推荐的位置数据。
var经纬度;
$ .getJSON(http://ipinfo.io,function(ipinfo){
console.log(Found location [+ ipinfo.loc +] by ipinfo.io);
latLong = ipinfo.loc.split(,);
});
来源: https://www.reddit.com/r/webdev/comments/3j8ipj/anyone_else_had_issues_with_the_html5_geolocation/
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??
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
var latLong;
$.getJSON("http://ipinfo.io", function(ipinfo){
console.log("Found location ["+ipinfo.loc+"] by ipinfo.io");
latLong = ipinfo.loc.split(",");
});
Source: https://www.reddit.com/r/webdev/comments/3j8ipj/anyone_else_had_issues_with_the_html5_geolocation/
这篇关于Chrome navigator.geolocation.getCurrentPosition()错误403的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!