编辑功能时无法拖动手柄

时间:2018-09-12 14:32:18

标签: leaflet leaflet.draw

我正在使用传单绘制以以下配置绘制和编辑图层。

    window.drawnItems = new L.FeatureGroup().addTo(map);
        var options = {
        position: 'topleft',
        edit: {
             featureGroup: window.drawnItems
        },
        draw: {
            polyline: {
                shapeOptions: {
                    color: '#f357a1',
                    weight: 10
                },
                                guideLayers: guideLayers,
            },
            polygon: {
                allowIntersection: false, // Restricts shapes to simple polygons
                drawError: {
                    color: '#e1e100', 
                    message: 'You can\'t draw that!'
                },
                shapeOptions: {
                    color: '#bada55'
                }, 
                                guideLayers: guideLayers,
            },
                        marker: {
                                guideLayers: guideLayers,
                                snapVertices: false
                        },
            rectangle: false,
            circle: false,
            circlemarker: false,
        }
    };

map.addControl(new L.Control.Draw(options));

添加新特征绝对好,但是当我尝试编辑特征时,我的意思是更改特征的几何形状,当我拖动手柄(白框)时,我将移动孔图而不是特征。因此,似乎有些事情阻止了插件的正常工作。 enter image description here

我也在使用

leaflet Snap "0.0.3"
leaflet": "^0.7.7",
leaflet-geometryutil": "*"
leaflet-draw": "^0.3.2"

0 个答案:

没有答案