Set the maximum zoom level to 18 (20m/50ft) in map configuration#87
Set the maximum zoom level to 18 (20m/50ft) in map configuration#87benoit74 merged 1 commit intoopenzim:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #87 +/- ##
=======================================
Coverage 33.33% 33.33%
=======================================
Files 11 11
Lines 981 981
Branches 133 133
=======================================
Hits 327 327
Misses 643 643
Partials 11 11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
benoit74
left a comment
There was a problem hiding this comment.
And where does the 18 magic number comes from? (no need to write this is source code but justifying the choice in the PR would help).
|
Regarding max zoom, I barely understand your logic because we do not ZIM only Monaco region but the whole world. We hence need something OK (or okayish at least) for the whole world. Since issue reported compared with https://www.openstreetmap.org/, what is the max zoom level over there? Can you find where and why they made this choice? |
|
The maximum zoom level in OpenStreetMap is not the same everywhere; it varies by region. For example, in Monaco the maximum visible resolution is around 20 m, whereas in Alexander Island it is around 5 m. This variation is partly due to differences in latitude, as different latitudes produce different ground resolutions at the same zoom level. In issue #86, the example used Monaco, where the maximum zoom corresponds to 20 m. Based on that, I experimented with different maxZoom values and found that setting maxZoom = 18 produces this level of detail for Monaco. Testing the same for Alexander Island in Antarctica gave a maximum visible resolution of 5 m, consistent with OpenStreetMap. It is also important to note that the zoom level depends on the tile type (vector vs raster). In our case, we are using vector tiles from OpenMapTiles, and with this configuration, maxZoom = 18 appears to be the most appropriate setting. |
|
Also according to my research OpenStreetMap is using maxZoom of 19 with raster tiles which will be equivalent to our maxZoom of 18 as we are using vector tiles instead of Raster tiles, which (vector tiles) provides roughly the same effective ground resolution as zoom 19 in the raster tiles. |
To me this does not indicate that max zoom level is not the same everywhere. It even kinda indicate the opposite: max zoom level is the same everywhere but due to latitude it does not produce the same maximum "resolution".
I don't get this. Vector or raster, what is displayed is the same thing, only "encoding" changes.
Again I don't get this logic.
Saying this from the very beginning would have been sufficient. LGTM, thank you. Please:
|
c787fbc to
4c5a2d3
Compare
|
All requested changes are done: commits squashed and CHANGELOG updated. Ready for final review. |
Fix formatting in changelog and eslint issue when setting maxZoom value Fix maximum zoom level in changelog to 18
4c5a2d3 to
95c1e7a
Compare
|
Your PR should not contain commits from another PR, especially once they have been merged to main. Here what you missed is a rebase. I've done it, thank you. |


Fixed issue #86
Set the maximum zoom level to 18 (20m/50ft), as going further deep does not translate to better view