mapbox-gl-draw icon indicating copy to clipboard operation
mapbox-gl-draw copied to clipboard

How to remove listener after map.on('draw.create', ... ?

Open xfishernet opened this issue 3 years ago • 1 comments

How to remove listener after map.on('draw.create', ... ?

xfishernet avatar Jan 01 '22 14:01 xfishernet

There is a map function to remove the listener: https://docs.mapbox.com/mapbox-gl-js/api/events/#evented#off

function someListener(){...}

map.on('draw.create', someListener);
map.off('draw.create', someListener);

jcarenza avatar Jan 12 '22 19:01 jcarenza