Chrome navigator.geolocation.getCurrentPosition()错误403 [英] Chrome navigator.geolocation.getCurrentPosition() error 403

查看:198
本文介绍了Chrome navigator.geolocation.getCurrentPosition()错误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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆