-
Notifications
You must be signed in to change notification settings - Fork 21
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
Possible to add multiple geotiff files? #41
Comments
Hi @mttucl, I had not encountered this use case yet. Is there a reason for not creating a leaflet layer for each file you want to render? |
Hi @danwild, please excuse my terrible skills in JS but I thought this what I'm doing. Isn't this what the |
Apologies @mttucl - you were right! I misread your problem. I think the issue comes from sharing the renderer between layers - each layer needs it's own renderer, try this: https://jsfiddle.net/sfnuLopj/ |
Excellent. Thanks @danwild. Any thoughts on the error mentioned at the bottom of my OP? I don't see it in JSFiddle but only in my local server. It doesn't seem to cause any issue other than the error message in Console. |
I'm using FileReader to add multiple files. It works fine for one file but when adding more files, only the last file is rendered correctly. I think it an issue with
transform(rasterImageData, args)
function as it is trying to apply data from the last file to the other files. Below is the relevant code and here is working example in JSFiddle.Another minor issue, I get
[object%20ArrayBuffer] 404 (Not Found)
error fromlayer.addTo(map);
. It renders the layer correctly but it seems related toFileReader (async)
andonAdd @ leaflet-geotiff.js:116
. No issue iflayer
is not added to the map.The text was updated successfully, but these errors were encountered: