makinacorpus / Leaflet.FileLayer

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

Added FileLoader.loadMultiple(files,ext) #41

Closed opoto closed 7 years ago

opoto commented 7 years ago

This method was "private" inside FileLayerLoad control, but it is also useful independently of this class, for apps that implement file selectors or drag & drop themselves. The new method could have been named "loadFiles", but then legacy "load" method should be renamed "loadFile" for consistency, which breaks backward compatibility. I had to introduce an extra parameter to the load() method to use a single file reader in tests, so that test code can set result for each files.

SBats commented 7 years ago

Hey thanks a lot for this contribution! That's some nice testing you add also, really appreciable! The overall looks good to me. Thanks also @leplatrem for taking the time to review!