[OpenLayers-Users] Scale Control rounding low-valued scales

Christopher Schmidt crschmidt at metacarta.com
Sun Feb 18 12:07:40 EST 2007


On Sun, Feb 18, 2007 at 04:53:19PM +0000, Stuart Eve wrote:
> Hi Christopher
> 
> Thanks for the reply,
> 
> From our point of view we deal with digitised archaeological plans 
> which are sometimes drawn at 1:20 or 1:10 (we are using metres as the 
> units not centimetres). Therefore rounding to the nearest integer for 
> scale is totally fine for us - it would be nice I guess to get right 
> down to 1:1! 

Okay. Thinking about it, there's actually no way at the moment to
specify a scale larger than 1:1 anyway: OpenLayers inverts scales
greater than 1, and doesn't below that, so it seems like rounding to the
nearest integer is best.

> Can you explain why the browser isn't the best for 
> centimetre accuracy? The MousePosition control seems to work well and I 
> have checked the coordinates of various features against my desktop GIS 
> and it seems right on... In fact Openlayers is working really well 
> (except for the scale read-out) we are loving it!

I'm not convinced that the math behind OpenLayers is something that
should be depended on if centimetre accuracy is needed. I don't have a
strong support for that, but I've dealt with too many rounding errors in
Javascript for me to be happy with saying that 10 is really 10. I
suppose these types of errors happen in any environment, but I see them
much more in the browser environment. 

If it's working for you, that's great. I just don't have faith in
browsers -- I've watched them break way too often :)

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list