I'm playing around with react-map-gl and mapbox-gl-draw to draw polygons on to my map
I'm wondering if there is a better way to get the details of a selected feature on click, rather than using the draw.selectionchange
event? This event handles clicks of multiple features, and also fires when you click OFF a feature, which I don't want. I just want to handle the click of a single feature.
The documentation I'm following: https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/API.md#drawselectionchange
The example on github that I am building from: https://github.com/visgl/react-map-gl/tree/7.0-release/examples/draw-polygon