0

我无法设置 GeolocateControl()

它没有错误,但不显示地理定位?

map.addControl(new mapboxgl.GeolocateControl({
    positionOptions: {
        enableHighAccuracy: true
    },
    trackUserLocation: true,
}));   
4

1 回答 1

0

您的代码是完美的,但您需要有安全的 https 连接才能在您的应用程序中看到 GeolocateControl。

于 2018-07-04T03:18:53.697 回答