mapbox-gl-draw
mapbox-gl-draw copied to clipboard
Draw several features
Hi All!
I need to draw several separate features.
Following behavior detected: re-call draw.changeMode('draw_.xxx') after the draw is finished lets to draw another feature and draw.getAll() returns a FeatureCollection with all those features. It is what i need, but looks like undocumented trick.
Question: Is there right way to draw such several features?
Usually when you want to draw several features you use
draw.set({
type: "FeatureCollection",
features: features
})