mapbox-gl-draw
mapbox-gl-draw copied to clipboard
Is there a way to save a drawn line or polygon? I think I've checked most places but can't find a way to do it.
Calling draw.getAll(); on the handle for the mapbox-gl-draw instance will fetch the geoJSON of all the drawn elements, and you can use/save that geoJSON from there... Is that what you mean?
You can, then, show those features by using the draw.add(); function.