[OpenLayers-Users] OpenLayers.Control.ScaleLine accuracy issue

Christopher Schmidt crschmidt at metacarta.com
Tue Jan 6 10:42:43 EST 2009


On Tue, Jan 06, 2009 at 07:30:20AM -0800, plen wrote:
> My question is to see why the OpenLayers scale remains the same, as if it
> were placed on a flat map.  

Because maps are flat. OpenLayers deals entirely with 2d map planes --
not spheres. The ScaleLine is based on the projected coordinate space;
distances are not geodesic. 

I believe it would be possible to make the scale line geodesic in
nature; no one has offered a clean patch for this functionality yet. 

I'm assuming that you're using Google Maps as a base layer. if you are,
are you using SphericalMercator? If you're not, I request that you do
so, and then try your measurements again -- in the projected coordinates
that the map is actually drawn in. Measuring in degrees will have the
effect you discuss, but 2d maps aren't measured in degrees, they're
measured in projected units.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list