Search code examples
polygonsmapbox-gl-js

Editable Polygons in Mapbox


I'm using the mapbox-gl-js library trying to implement a function where the user can add polygons to a mapbox map and edit them if desired. I've been able to add the polygon to the map by adding a layer, but I don't know how to allow users to edit them. Is there a simple way to add polygons to mapbox and change whether or not they are editable?


Solution

  • You're looking for the mapbox-gl-draw plugin. You can see a demo here.