leafelt-geoman-styleeditor插件集成

leafelt-geoman-styleeditor

https://github.com/weizhixiang/leafelt-geoman-styleeditor

集成以下三個leaflet插件

  1. https://github.com/geoman-io/leaflet-geoman
  2. https://github.com/dwilhelm89/Leaflet.StyleEditor
  3. https://github.com/makinacorpus/Leaflet.TextPath

感謝原作者創造如此美好的插件!

  1. 在Leaflet.StyleEditor中增加了監聽geoman創建新圖形的接口,使得創建完圖形即可設置樣式,
  2. 在leaflet-geoman中修改了默認marker圖標,使得與Leaflet.StyleEditor默認圖標一致,
  3. 在leaflet-geoman中添加一種單線段,可在上面顯示距離,距離計算使用的leaflet默認方法的distanceTo,長距離計算是否按大地線,請自行研究
  4. 因爲引入Leaflet.TextPath,所有polyline類型的圖形即可繼承Leaflet.TextPath方法樣式設置沿線文字
  5. 繼承以上三個插件中所有events,請自行查看源文檔
  6. demo中的index.html簡單示例
    在這裏插入圖片描述