mapbox / mapbox/leaflet-image

NativeZoom not Applied to Exported Image

Open
#127 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
380
Forks
140
PR merge metrics
No merged PRs in 30d

Description

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);`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the example with the ArcGIS tileLayer and the leafletImage(map, doImage) export callback, then trace how maxNativeZoom is handled while tiles are collected. Verify the exported canvas includes all expected tiles without missing areas when the map uses a native zoom limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.