On Fri, Dec 07, 2007 at 09:00:53PM +0100, Eric Lemoine wrote: > On Dec 7, 2007 3:53 PM, Bart van den Eijnden (OSGIS) <[EMAIL PROTECTED]> > wrote: > > Hi list, > > > > I am trying to make one of my WMS layers scale dependent (only visible > > between 0 and 1:25000, units: m), but I cannot get it done. > > > > My map is constructed with an array of scales and a maxExtent. > > > > On my layer I use minScale 25000 and maxScale 0. > > > > But since the code in InitResolutions of Layer.js falls back on the map > > object, the Layer's scales array will be set using the Map's scales array, > > and the code for minScale and maxScale will never be reached. > > When I look at the code, I see the opposite. minScale, maxScale and > friends are taken from the map object *only* if they're not specified > at the layer level.
But the *scales* object always comes first, and *is* pulled from the map object -- overriding min and max scale. (For the record, I think this is a bug, but I'm not sure exactly how to fix it.) -- Chris > <http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Layer.js#L411> > <http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Layer.js#L604> > > Am I missing something here? > > -- > Eric > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
