All,

I'm using OpenLayers (latest trunk version) with GeoServer 2.0.1 to display
various layers which have scale rules defined on them within the GeoServer
SLD (i.e. MaxScaleDenominator and / or MinScaleDenominator).

I initially found that the scale in OpenLayers didn't match that in
GeoServer but I have followed the steps outlined in this post
http://openlayers.org/pipermail/users/2008-October/008453.html and as such
added the following line before I use any of the OpenLayers classes:

OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;

This means that the scale displayed by OpenLayers now matches that used by
GeoServer to one / two decimal places.

However, I have found that the map.zoomToScale function no longer works as
expected. As such when I invoke map.zoomToScale(4578, false) the map zooms
to a scale of 1:6800 instead of 4578 as expected.

Does anybody have any ideas as to what I am doing wrong? Do I need to change
something in addition to OpenLayers.DOTS_PER_INCH?

Thanks

Andrew
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to