'leaflet poligon draw and kml load
new leaflet user here.
basically I need to achieve 2 things:
1.draw a poligon (with my mouse) on a lealet map and be able to edit it
2. import/export kml data from KML into/outof a lealet map.
I have some basic questions:
1. can this be achieved easaly with leaflet only? (no plugins)
2. when using plugins: like leaflet-kml/omnivore/filelayer/draw/tokml etc I know I can achieve what I need. but all these plugins latest tagged version is from years ago. I am not sure if its ok to use them and how come there isnt a newer version (maybe there's no need for a new one)
I would appreciate your answers very much
thanks!
Solution 1:[1]
You can make all your drawings in Leaflet, but with some exceptions, for example; difference, polygon merge-transfer, autotrace etc. The plugins turf and geoman you can use in your situations will be successful for you.
Among the kml import-export operations, as you mentioned, tokml will work for the export operation, although its last update is outdated. For the import process, I suggest you search for the KML plugin included in the leaflet, it will be successful for you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Muhammed Ali KURT |