尝试使用传单绘制 delete/edit 形状时出错 - ESRI

Error while trying to delete/edit shape using leaflet draw - ESRI

我正在尝试删除/编辑使用传单绘制创建的形状。

我在尝试编辑创建的形状时遇到以下错误。

我正在使用 leaflet 1.0-rc1 和 leaflet draw 版本 0.3.2。

这是我的代码:

 var map = L.map('map').setView([28.7041, 77.1025], 13);
    L.esri.basemapLayer("Topographic").addTo(map);
    //Edit Toolbar

    var drawnItems = new L.FeatureGroup();
    map.addLayer(drawnItems);

    var drawControl = new L.Control.Draw({
        draw: {
            position: 'topleft',
            polygon: {
               allowIntersection: false,
                drawError: {
                    color: '#b00b00',
                    timeout: 1000
                },
                showArea: true
            },
            circle: {
                shapeOptions: {
                    color: '#662d91'
                }
            },
            polyline: false,
            rectangle: true,
            marker: false,
        },
        edit: {
            featureGroup: drawnItems
        }
    });
    map.addControl(drawControl);

    map.on('draw:created', function (e) {
        var type = e.layerType,
        layer = e.layer;
        drawnItems.addLayer(layer);
    });

对于 Leaflet 1.0,您必须使用 Leaflet.draw leaflet-master branch, as mentioned on the repo home page:

Support for Leaflet 1.0 is in development at the leaflet-master branch.

演示:https://plnkr.co/edit/PmHj1FhOoeZBEsAnEu1z?p=preview

这意味着您可能无法从插件中获得所有最新功能(例如