Open Milkker opened 5 years ago
Make sure you are importing leaflet-editable
AFTER leaflet
& react-leaflet
. This import augments the leaflet module with the editable fields.
import { ... } from "leaflet";
import { ... } from "react-leaflet";
import "leaflet-editable"; //Imports the augmented Leaflet module
I am try to add Leaflet layer from well know text(wkt). I found it does not include EditableMixin cause that layer.enableEdit is not a function error. https://github.com/Leaflet/Leaflet.Editable/blob/6bf3b5a1a7ac4dce675eaf1d8a7bed2ba37f9361/src/Leaflet.Editable.js#L1917-L1938 How can I use enableEdit method with layer class? Sample code:http://jsfiddle.net/Lhq0ance/8