地理位置错误:错误(1):用户拒绝地理位置提示

问题描述 投票:1回答:1

我在Firefox和Safari中都遇到了控制台错误:ERROR(1): User denied geolocation prompt在调用navigator.geolocation.getCurrentPosition()

我做了一个非常简单的Geolocation演示,就像这里的例子:https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition#Example

它是https安全的,我单击允许位置访问。

这是演示:https://demo.footstepsmarketing.com/locator.html

它适用于Chrome。我可以确认它在Firefox 63中有效,但在64以后不能。它在Safari中不起作用。非常感谢任何见解,谢谢!

firefox safari geolocation
1个回答
0
投票

看起来他们在新版本中修复它,面临同样的问题:

https://www.ghacks.net/2019/03/01/firefox-65-0-2-fixes-a-geolocation-issue/

© www.soinside.com 2019 - 2024. All rights reserved.