jxmapviewer2 icon indicating copy to clipboard operation
jxmapviewer2 copied to clipboard

Definition of zoom level does not follow conventions

Open mainkai opened this issue 4 years ago • 2 comments

Hi, first of all, thanks for the great library.

I noticed that the implementation of zoom levels uses a strange and unclear definition, leading to 0 being the maximum possible zoom level and requiring calculations with hardcoded values like here.

Wouldn't it be better to just use the definition of zoom levels that OpenStreetMap uses, i.e. zoom 0 = whole world with 360° Tile width and an unconstrained number of higher zoom levels?

Maybe that could also help with that issue, since zoom level 0 would not be the maximum any more, but the minimum instead. So zoom levels > 17 should not be a problem any more...

mainkai avatar Apr 02 '20 11:04 mainkai

Yeah, I agree that it is odd. I believe that the super-old Blue Marble renderer worked that way and the original authors made OSM behave the same. Changing it now is difficult, since it would break the compatibility with all existing implementations, so I left it was it was. Not sure if anything can be done here with reasonable effort.

msteiger avatar Apr 05 '20 08:04 msteiger

I wondered too because I used the Leaflet JavaScript library before and zoom levels are reversed.

Heiko-Zelt avatar Oct 05 '22 16:10 Heiko-Zelt