[Mapcss] MapCSS 0.2 finalization - zoom levels

Paul Hartmann phaaurlt at googlemail.com
Tue May 1 14:47:31 BST 2012


Hi,

I've written a little analysis of the Zoom-Selector and possible
interpretations:

http://wiki.openstreetmap.org/wiki/User:Bk/MapCSS#Zoom

Basically, when you have a TMS (like the Openlayers map on
openstreetmap.org), the tiles at a given zoom level don't have the same
scale. In fact it varies quite a lot: E.g. zoom 18 tiles at the equator
have scale of 1.7 px per meter, but at 60° latitude they have a scale of
3.3 px per meter. (The distortion comes from the Mercator projection)

This means, if a renderer ties the MapCSS zoom levels to TMS
tile-levels, a typical city map of 5 km x 5 km may be rendered very
differently depending on the location of the city on the earth.

For these reasons, the zoom levels in the Mapnik style file do *not* map
exactly to tile levels, but are converted to scales first.

In my opinion, it should be the same in MapCSS and the definition of the
zoom selector should be based on map scale rather than on the projected
coordinates in the Mercator projection.

Paul



More information about the Mapcss mailing list