Incorporating Mapbox and Leaflet, I have been able to draw, edit, and remove polygons efficiently. In some cases, users may possess zipped shapefiles and prefer using them instead of drawing new polygons. To facilitate this, I am leveraging leaflet.shapefile for uploading shapefiles and integrating them into the map.
However, upon attempting to edit the shapefiles using the Leaflet Draw control, an error message stating "i.editing is undefined" appears. Even after converting the layer to GeoJSON before adding it to the featureGroup, as illustrated in the code snippet below, the issue persists:
var layergeojson = layer.toGeoJSON();
featureGroup.addLayer(layergeojson);
You can view my current progress on this matter in this jsfiddle. Despite conducting extensive research online, I have not come across any similar instances or solutions.
Are there any feasible methods to enable editing of uploaded shapefiles using the Leaflet Draw control?