[OpenLayers-Users] Scale Control rounding low-valued scales
Tim Schaub
noreply at geocartic.com
Tue Feb 20 18:10:17 EST 2007
Stuart Eve wrote:
> Hi Christopher
>
> Thanks for the reply,
>
> Stuart
>
> Christopher Schmidt wrote:
>
>> Stuart Eve posted ticket 503 this morning:
>> OpenLayers.Control.Scale doesn't seem to read correct scale below 1:500
>>
>> The problem is that any scale value less than 9500 is rounded to the
>> nearest hundred. It's clear to me that rounding to the nearest hundred
>> is not really neccesary: the numbers displayed will be the same length
>> whether they are or aren't (or close to it, anyway).
I think we should be talking about significant figures when talking
about scale.
parseFloat(scale.toPrecision(3))
turns 123456 into 123000, 0.123456 into 0.123, 0.000123456 into
0.000123, and 1 into 1.
Tim
>>
>> However, Stuart points out that he needs 'centimetre accuracy'. Ignoring
>> the fact that the browser is probably not the best environment for
>> centimetre accuracy, I'm wondering what scale level we need to support
>> down to: Is rounding the scale to the nearest integer enough accuracy?
>> I'd obviously say yes, but I work on scales of 1:443M, not on scales of
>> 1:100.
>>
>> Can someone educate me: what do users expect when they set a scales
>> array of:
>> [105, 10.5, 1.05]
>> ?
I would expect scales of 105, 10.5, and 1.05.
>>
>> Stuart, I suppose this is directed mostly at you, since you're the one
>> who opened the bug report.
>>
>> Regards,
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
More information about the Users
mailing list