[OpenLayers-Users] How do we use MaxScaleDenominator andMinScaleDenominator

Lance Dyas lancelot at inetnebr.com
Fri Jan 5 06:24:08 EST 2007


Tim Schaub wrote:
>> WMS 1.3.0 has MinScaleDenominator and MaxScaleDenominator...
>> these do not seem to correspond to setting minScale and 
>> maxScale on a layer... does anyone know the translation between them?
>>     
>
> The WMS spec assumes a pixel size of 0.28mm x 0.28mm in the definition of
> MinScaleDenominator and MaxScaleDenominator.
>   
It is pretty much the only standard we have to go by as this kind of 
thing is arbitrary and every device
could have completely differing pixel size (browsers do not make this 
information available)
> OpenLayer assumes a "sensible default" of 72 dpi (or about 0.353mm pixel
> width and height). 
Sounds like the numbers Adobe uses in pdf format... but the Windows 
desktop monitors I've seen
seem to be 96 or116 or similar, closer to the OGC standard numbers.

I would argue the sensible default isnt necessarily sensible.

>  Change OpenLayers.DOTS_PER_INCH if you want this to be
> different.
>   
I will let you know if this accomplishes what is needed however when I 
set the minScale value in OpenLayers to be the MinScaleDenominator values
basically the layer never seemed to be in Range.... which I would not 
expect if we were only talking the difference between .288 versus .353
> If I were you, I'd take the sensible path and boycott anything that relies
> on scale (which depends on an agreement of pixel display size between client
> and server)
Oh I agree, the boss doesn't - ie no choice.
> , and use pixel resolution (map units per pixel) where ever
> possible.
>   
note in some projections a pixel near the top of the screen will be 
completely different than near the bottom
ie. we are always just approximating to provide users clues about 
relative sizes of things that are warped by being made 2d.
> Tim
>
>
> OpenLayers.DOTS_PER_INCH = 90.714; // should give you good behavior if you
> have to use WMS 1.3 
>   

 




More information about the Users mailing list