leafelt-geoman-styleeditor
https://github.com/weizhixiang/leafelt-geoman-styleeditor
集成以下三个leaflet插件
- https://github.com/geoman-io/leaflet-geoman
- https://github.com/dwilhelm89/Leaflet.StyleEditor
- https://github.com/makinacorpus/Leaflet.TextPath
感谢原作者创造如此美好的插件!
- 在Leaflet.StyleEditor中增加了监听geoman创建新图形的接口,使得创建完图形即可设置样式,
- 在leaflet-geoman中修改了默认marker图标,使得与Leaflet.StyleEditor默认图标一致,
- 在leaflet-geoman中添加一种单线段,可在上面显示距离,距离计算使用的leaflet默认方法的distanceTo,长距离计算是否按大地线,请自行研究
- 因为引入Leaflet.TextPath,所有polyline类型的图形即可继承Leaflet.TextPath方法样式设置沿线文字
- 继承以上三个插件中所有events,请自行查看源文档
- demo中的index.html简单示例

本项目集成了Leaflet-Geoman、Leaflet.StyleEditor及Leaflet.TextPath插件,实现地图图形绘制、样式编辑及沿线文字显示功能。改进包括新增单线段距离显示,统一图标风格,以及对创建图形即时样式设定的支持。
2563





