[OSM-talk] How inaccurate was the mapnik distance/scale marker?
privat at egil-hjelmeland.no
Tue Feb 23 21:20:56 GMT 2010
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.
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:
It is also very easy to make measurement functions in OpenLayers. And
the good thing is that the OpenLayers Measure class is geodesic aware,
it handles mercator out of the box. I think it would be good to include
that on the OSM main map, as well.
> There used to be a distance indicator graphic in the bottom left of the map.
> I believe it was removed because it was inaccurate due to the curvature
> of the Earth.
> I can understand the point at low zoom levels, but at say, zoom 13, just
> how inaccurate, percentage wise, is it?
> I found it quite useful as a guide. Obviously I didn't do any intricate
> journey calculations based on it, but as a ball park figure, it came in use.
> Could it be reinstated for the higher level zooms, >11 maybe?
> Dave F.
More information about the talk