makinacorpus / Leaflet.FileLayer

Loads files locally (GeoJSON, KML, GPX) as layers using HTML5 File API
http://makinacorpus.github.io/Leaflet.FileLayer/
MIT License
271 stars 91 forks source link

How to use the points which come from the leaflet file layer plugin? #48

Closed academicgirl closed 6 years ago

academicgirl commented 6 years ago

How to use the points which come from the leaflet file layer plugin?

I am using leaflet file layer plugin.I have added a kml file which includes some points. I want to do sth by using these points. But I don't know if the plugin saves this data or not. How can I use these points?

leplatrem commented 6 years ago
control.loader.on('data:loaded', function (e) {
    const layer = e.layer;
    // Do something here with the layer, like introspect its points.
    // See Leaflet.js reference.
});
SBats commented 6 years ago

Thanks @leplatrem for giving example! I've added one as well in the dev folder code.