[Mapcss] MapCSS 0.2 finalization - zoom levels

Paul Hartmann phaaurlt at googlemail.com
Fri May 4 17:23:52 BST 2012


On 05/04/2012 03:00 PM, Komяpa wrote:
> 2012/5/1 Richard Fairhurst <richard at systemed.net>:
>> On 01/05/2012 14:47, Paul Hartmann wrote:
>>>
>>> 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.
> 
> Here we come to usual problem:
>  - those who came from traditional maps think in scales;
>  - those who came from web-GIS think in zoom levels.
> 
> There's no useful "scale" in EPSG:3857 - it changes depending on
> latitude. So it is possible that renderer has to mix styles for
> different scales in one screen.

This is maybe too drastic, I'd just take the scale of the centre pixel
and use it for the entire mapcss styling process.

> If you're using a different projection, and it's majorly different
> from EPSG:3857, you have no "default" tiles grid.
> 
> Do we have any real application now that uses not EPSG:3857 aka
> Spherical Mercator for rendering?

In JOSM you can switch to different projections, and this is often
necessary in order to display aerial imagery from a local WMS.
(On-the-fly warping isn't supported for WMS.)

Spherical Mercator is just one projection of many and if it was the
reference point, I'd had to put

mapcss_scale = scale * cos(lat)

somewhere in the display code, and this feels a bit arbitrary.

On the other hand it is good, when the mapcss zoom levels correspond to
the TMS levels, if they are displayed in the background.

Paul



More information about the Mapcss mailing list