makinacorpus / Leaflet.FileLayer

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

Support restricting accepted file formats via whitelist. #13

Closed cjcenizal closed 10 years ago

cjcenizal commented 10 years ago

@leplatrem I figured this would be useful to others... you can whitelist the file formats you want to allow, like this:

L.Control.fileLayerLoad({
  formats: [
    '.geojson',
    '.kml'
  ]
});
leplatrem commented 10 years ago

Excellent ! Thanks !

Could you add a mention of this in the README please before I merge ?

cjcenizal commented 10 years ago

Thanks! I just updated the README.

cjcenizal commented 9 years ago

Thanks @leplatrem ! Would you mind releasing a new tag with this feature?

leplatrem commented 9 years ago

Done !