Double on click event with mapbox gl
问题 I am redrawing layers on style.load event and removing the layers map.on('style.load', function() { loadByBounds(tempBounds) }); function loadByBounds(b) { if (map.getLayer("cluster-count")) { map.removeLayer("cluster-count"); } ... map.on('click', 'unclustered-point', function(e) { var popup = new mapboxgl.Popup() .setLngLat(e.features[0].geometry.coordinates) .setHTML(text) .addTo(map); })} But how to remove map.on('click') events? As when I click the point the Popup() displays 2 times. And