-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple file upload demo #37
base: gh-pages
Are you sure you want to change the base?
Conversation
<input type="submit" id="submit"> <span id="warning"></span> | ||
|
||
<script> | ||
map = L.map('map', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 [email protected]
|
No description provided.