Skip to content
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

NativeZoom not Applied to Exported Image #127

Open
hjrobinson opened this issue Jul 23, 2019 · 3 comments
Open

NativeZoom not Applied to Exported Image #127

hjrobinson opened this issue Jul 23, 2019 · 3 comments

Comments

@hjrobinson
Copy link

NativeZoom option doesn't seem to be applied to exported image (you have missing tiles).
For example:
L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z} /{y}/{x}.png', { maxNativeZoom: 16 }).addTo(map);

function doImage(err, canvas) { var img = document.createElement('img'); var dimensions = map.getSize(); img.width = dimensions.x; img.height = dimensions.y; img.src = canvas.toDataURL(); snapshot.innerHTML = ''; snapshot.appendChild(img); }

setTimeout(function() { leafletImage(map, doImage); }, 2000);

@gihandilanka-github
Copy link

@hjrobinson I have the same issue, have you fixed this?

@hjrobinson
Copy link
Author

Ha, it's been a while since I commented on this. No, I didn't fix it. I basically ended up using Mapbox-GL-JS instead and this repo:
https://github.com/mpetroff/print-maps
Of course it would have been cool to export images directly with Leaflet and use the maxNativeZoom option.

@gihandilanka-github
Copy link

gihandilanka-github commented Jun 1, 2021

@hjrobinson Thank you for your reply. I will have a try with https://github.com/mpetroff/print-maps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants