You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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); }
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.
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);
The text was updated successfully, but these errors were encountered: