Mapbox GL JS:仅 Chrome 中的全屏和 GPS 按钮问题

Mapbox GL JS : Fullscreen and GPS button Issues in Chrome only

我正在使用 Mapbox 进行天气可视化项目(3 个窗格锁定在一起,一个用于导航,在看到 link 之前很难解释。)

在我继续之前,我会 post 一个 link 我在这里讨论的网络应用程序,所以你可以看到它。我的代码一团糟,我知道这一点,但我认为这是浏览器问题。

http://ability.a2hosted.com/main.html

在 Edge 和 Firefox 中,全屏和导航按钮工作正常。在 Chrome 中,它们不起作用...全屏按钮会使浏览器卡住,直到您按下退出键(并且无论如何都无法正确呈现!)。而且,事实上,chrome 甚至根本不显示导航按钮。

有没有办法让这些按钮像在 firefox 和 edge 中那样显示和运行?或者,也许是备用按钮?我附上了页面外观的屏幕截图。

我应该注意,我可以在没有全屏按钮的情况下生活,但我需要导航按钮选项才能在 chrome 中工作。这对我的项目来说确实是必须的,所以即使有另一个 link 或按钮我可以放在它上面以某种方式激活它,只要它能工作就没问题。经过 2 小时的研究,我对 JS 的了解还不够好,无法理解可能导致此问题的原因。

来自https://www.mapbox.com/mapbox-gl-js/api/#geolocatecontrol

Not all browsers support geolocation, and some users may disable the feature. Geolocation support for modern browsers including Chrome requires sites to be served over HTTPS. If geolocation support is not available, the GeolocateControl will not be visible.