问题描述
我在我的网站上收到此错误,该错误要求用户提供地理位置数据:
I am getting this error on my website which requests Geolocation data from the user:
getCurrentPosition() 和 watchPosition() 在不安全的来源上被弃用,并且支持将在未来被删除.您应该考虑将应用程序切换到安全源,例如 HTTPS.请参阅 goo.gl/rStTGz 了解更多详情.
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.
我的意思是它基本上只是一个通知,谷歌链接只是说它已被弃用.
I mean its basically just a notice, and the google link just says its being deprecated.
我没有将我的网站迁移到 SSL 的计划...那么像我这样的人有其他选择吗?
I have no plans on moving my website to SSL... so is there an alternative for someone like me?
推荐答案
在/jstillwell 的帖子中找到了可能的答案:https://github.com/stefanocudini/leaflet-gps/issues/15基本上将来不会支持此功能(仅在 Chrome 中?),但仅适用于 HTTP 站点.HTTPS 仍然可以,并且没有计划为 HTTP 使用创建等效替代品.
Found a likely answer in /jstillwell's posts here: https://github.com/stefanocudini/leaflet-gps/issues/15 basically this feature will not be supported (in Chrome only?) in the future, but only for HTTP sites. HTTPS will still be ok, and there are no plans to create an equivalent replacement for HTTP use.
这篇关于getCurrentPosition() 和 watchPosition() 在不安全的来源上被弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!





大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)