[OpenLayers-Users] bug when having layers with minScale/maxScale?

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Tue Mar 11 06:32:03 EDT 2008


Hi list,

using trunk (but I believe this has been in the library for a long time
already) we have encountered the following problem:

-define a layer with minScale and maxScale (layer is visible between 1:500
and 1:50000 for instance)
-zoom in to scale 1:45000 so the layer is visible
-call setVisibility(false) on the layer
-zoom out to 1:200000 for instance
-call setVisibility(true) on the layer

The layer will show the old tile, see e.g.:

http://www.osgis.nl/download/MR01.JPG

I could solve it by removing the inRange check in Layer.js:

from:

if (extent && this.inRange && this.visibility) {
    this.moveTo(extent, true, false);
    redrawn = true;
}

to:

if (extent && this.visibility) {
    this.moveTo(extent, true, false);
    redrawn = true;
}

but there should be a better way for sure. TIA.

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl








More information about the Users mailing list