Opened 2 years ago

Last modified 21 months ago

#18064 closed defect

TMS layer by default didn't go beyond 21 zoom regardless of max zoom setting in properties — at Version 2

Reported by: SergeyAstakhov Owned by: team
Priority: major Milestone: 19.10
Component: Core imagery Version:
Keywords: zoom Cc: wiktorn

Description (last modified by Don-vip)

When adding a TMS layer without specifying the maximum zoom level (for example, via the remotec ontrol from OpenAerialMap "Open in JOSM"), it is limited to the default level of 21, despite the fact that the settings for TMS in preferences are set to a higher value.

This limitation is obtained in the AbstractTileSourceLayer.checkMaxZoomLvl() method when comparing the zoom with the return value from the ts.getMaxZoom() method:

if (ts != null && ts.getMaxZoom() != 0 && ts.getMaxZoom() < maxZoomLvl) {
   maxZoomLvl = ts.getMaxZoom();

which ends for the TMS layer in the AbstractTMSTileSource.getMaxZoom() method, which returns a hardcoded value of 21.

As workaround you can ether always specify max zoom level in url templates, ether use other layer types (if possible). However, this is inconvenient in some situations (in particular, OAM "Open in JOSM" didn't pass max zoom level to remotecontrol), so it would be much better if the default maximum zoom was taken from the settings and was not hardcoded.

Change History (2)

comment:1 Changed 2 years ago by SergeyAstakhov

Description: modified (diff)

comment:2 Changed 2 years ago by Don-vip

Cc: wiktorn added
Description: modified (diff)

@wiktorn can you please take a look?

Note: See TracTickets for help on using tickets.