我正在尝试使用Leaflet.Editable上的Leaflet插件,因此我在地图上添加控件并绘制不同的形状。
虽然这些示例运行良好,但我无法在最新版本的传单version 1.1.0
上运行此插件,并且它一直告诉我以下错误:
Uncaught TypeError: L.Polyline._flat is not a function
at NewClass.initVertexMarkers (Leaflet.Editable.js:1022)
at NewClass.addHooks (Leaflet.Editable.js:1015)
at NewClass.enable (leaflet-src.js:5559)
at NewClass.enableEdit (Leaflet.Editable.js:1736)
at NewClass.startRectangle (Leaflet.Editable.js:336)
at NewClass.<anonymous> (MyJSFile:128)
at HTMLAnchorElement.handler (leaflet-src.js:2225)
为什么会这样?社区应该相应地更新插件吗?
P.S。可编辑示例正在使用版本1.0.3