[OSM-talk] How inaccurate was the mapnik distance/scale marker?

Dave F. davefox at madasafish.com
Wed Feb 24 12:58:01 GMT 2010


Thanks for your replies

Egil Hjelmeland wrote:
> I assume you are referring to the OpenLayers based slippy map at 
> openstreetmap.org? The Openlayers 2.8 ScaleLine class has the the 
> problem that it does not handle that the map-scale is not constant 
> accoss the map. The slippy map uses mercators projection, where the 
> scale increases with 1/cos(lattiude). So the scaleline is correct at 
> equator, but a over  factor 2 off where I am at 62 north.

Excuse my ignorance, are you saying that it's 2x inaccurate at all zoom 

> But it is trivial to make a mercator-specific variant of ScaleLine. I 
> have made one here: 
> http://www.egil-hjelmeland.no/kart/mercatorScaleLine.js. Anyone are free 
> to use it. View it in action at my playground: 
> http://www.egil-hjelmeland.no/kart/ .

So one of the mapnik guys could implement it quite easily then?

Dave F.

More information about the talk mailing list