Loads local files (GeoJSON, GPX, KML) into the map using the HTML5 FileReader API
Loads local files (GeoJSON, GPX, KML) into the map using the HTML5 FileReader API, without server call !
- A simple map control
- The user can browse a file locally
- It is read locally (
FileReader) and converted to GeoJSON
- And loaded as a layer eventually!
Check out the demo !
For GPX and KML files, it currently depends on Tom MacWright's togeojson.js.
var map = L;
var control = LControl;
- Better plugin packaging and dependencies
- Adding bower support (thanks @george-silva)
- Adding support for custom geoJson layers (thanks @MuellerMatthew)
- Treating json files as geoJson (thanks @Jmuccigr)
- Load multiple files (thanks @jens-duttke)
- Support whitelist for file formats (thanks CJ Cenizal)
data:error event (thanks @joeybaker)
- Fix multiple uploads (thanks @joeybaker)
addToMap option (thanks @joeybaker)
(* Did not release version 0.2 to prevent conflicts with Joey's fork. *)
- Mathieu Leplatre
- Joey Baker http://byjoeybaker.com
- CJ Cenizal
- Matthew Mueller
- George Silva
- Simon Bats