Simple file upload demo#37
Conversation
| <input type="submit" id="submit"> <span id="warning"></span> | ||
|
|
||
| <script> | ||
| map = L.map('map', { |
Limited input to .zip.
|
I made the changes you suggested in the file. I'm not too good with github so forgive me if I'm messing up the process a bit. |
| } | ||
|
|
||
| function convertToLayer(buffer){ | ||
| shp(buffer).then(function(geojson){ //More info: https://github.com/calvinmetcalf/shapefile-js |
There was a problem hiding this comment.
you should either do
shp(buffer).then(function(geojson){
var layer = L.geojson(geojson).addTo(map);
});or
var layer = L.shapefile(buffer).addTo(map);Simplified converToLayer functionl.
|
So, is the shp.js class already converting shapefile into geojson then? What does L.shapefile do? Is it just a simpler version that does both steps at once (shapefile->geojson->layer)? |
|
yup thats all L.shapefile does On Wed, May 18, 2016 at 2:55 PM Anika S Halota notifications@github.com
|
No description provided.