geopaparazzi / smash

Source code of the SMASH Android/iOS digital field mapping app.

Home Page:https://www.geopaparazzi.org/smash/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenStreetMap map tiles stopped working at the 50m zoom level.

altilunium opened this issue · comments

Still works at 100m, but it suddenly goes blank at 50m.

image

SMASH version : 1.7.6

This seems to be due to a discrepancy between three max zoom values:

  1. The max zoom level of the map, unrelated to the tile layer
  2. The maxZoom of the tile layer, after which it stops rendering
  3. The maxNativeZoom of the tile layer, after which it scales the tiles instead of loading the next higher resolution zoom level

By default, the maxZoom for OpenStreetMap is 16, so if you zoom in to level 17 (50m) you get nothing. maxNativeZoom is set at 19.

A workaround is to edit the tile source to have the max layer set as high as you need, capped by the maxNativeZoom of 19. Then remove the OpenStreetMap layer and re-add it to your project to update the settings.

(Opinion) I would expect the max zoom setting when adding a tile source to represent when it stops fetching tiles from that source, but still renders them scaled. So in my opinion, the tile source max zoom should set the tile layer's maxNativeZoom, and the tile layer's maxZoom should be whatever the map uses for the max zoom level.

Hello. The OSM predefined source does default to 19 for me (version 1.7.6 from F-droid, if that's relevant). I rewrote 19 and saved anyway, but no effect :(

This one has been fixed in the code base and will be available in the next version.