fix: cap USGS maxZoom at 16 to match tile server capability - #709
Merged
Merged
Conversation
The USGS national map tile endpoints (USGSTopo, USGSImageryOnly, USGSImageryTopo) return 404 above zoom level 16. Verified on 2026-09-17: zooms 8-16 return HTTP 200 while 17 and above return HTTP 404 for all three services, so the previous maxZoom of 20 produced missing-map areas for users who zoom past 16. Fixes leaflet-extras#570
This was referenced Sep 17, 2026
brunob
approved these changes
Sep 24, 2026
Member
|
Thx for this one :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #570
Freshly verified against the live tile servers on 2026-09-17 (CONUS center,
basemap.nationalmap.gov):Two findings versus the issue thread:
maxZoom: 20for all three USGS variants. Users panning at zoom 17+ get empty grey areas.This PR sets the shared parent
maxZoom: 16, which covers all three variants (USTopo,USImagery,USImageryTopo) since they inherit it.Note: if you would rather keep zooming closer with upscaled tiles, Leaflet's
maxNativeZoom: 16would do that — I kept it plainmaxZoombecause the file doesn't usemaxNativeZoomanywhere today. Happy to switch if preferred.