Plugin throws an error if maxNativeZoom is used and the map is already zoomed past that value

Open
#63 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Reproduce the issue with maxNativeZoom set to 13, maxZoom set to 18, and the map already zoomed beyond 13. Trace the tile lookup used when generating the map image; done means the image generation uses available tiles at the native limit instead of throwing a missing-tile error.

Written by the indexing model from the issue text.

Description

Sorry first comment, please chastise me if I've messed it up.

Essentially I'm trying to use a map with an overlay layer. A list is generated for the overlay, and the maps zooms to the bounds of the overlay when an item is selected.

I'm using a limited set of tiles to save on space using maxNativeZoom(13), but I also have maxZoom(18) so that the map can be zoomed further if needed.

Now the problem. If I try to get a map image and the current map zoom is greater than the maxNativeZoom a missing tile error is thrown, as this plugin is looking for tiles at that zoom level rather than getting them for the maxNativeZoom.

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

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.

More from mapbox/leaflet-image

All issues in mapbox/leaflet-image

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.