I'm using Openlayer and Geoserver.I have a series of layers that have a scale parameter like: 1:50000-1:25000 where 50000 is the max scale while 25000 is the minscale.I have a map like in this example:
map = new OpenLayers.Map({ allOverlays: false, projection: "EPSG:32632", maxExtent: bounds, scales:[500000,350000,250000,100000,25000,20000,15000,10000,5000], units: 'm' });And I have this layer WMS:
var layer = new OpenLayers.Layer.WMS("layer1",wms_address, { layers:"ws:layer1", transparent:true }, { // minResolution: 14.035643,// maxResolution : 7.01782148 maxScale:50000, minScale:25000 }); and I would expect that the layer within that scale it dosen't show up in the map. I need this kind of behaviour. However if I set the scale 1:25000, the layer is present inside the map (I saw it with Firebug) but it is not showed up in the map!
I also tried with max and min Resolution but nothing, the layer is in the map but I cannot see it.
What I'm doing wrong? Please help me, I looked everywhere in every forum I don't know how to solve this problem!
Thank you very much.
Laura
أكثر...
map = new OpenLayers.Map({ allOverlays: false, projection: "EPSG:32632", maxExtent: bounds, scales:[500000,350000,250000,100000,25000,20000,15000,10000,5000], units: 'm' });And I have this layer WMS:
var layer = new OpenLayers.Layer.WMS("layer1",wms_address, { layers:"ws:layer1", transparent:true }, { // minResolution: 14.035643,// maxResolution : 7.01782148 maxScale:50000, minScale:25000 }); and I would expect that the layer within that scale it dosen't show up in the map. I need this kind of behaviour. However if I set the scale 1:25000, the layer is present inside the map (I saw it with Firebug) but it is not showed up in the map!
I also tried with max and min Resolution but nothing, the layer is in the map but I cannot see it.
What I'm doing wrong? Please help me, I looked everywhere in every forum I don't know how to solve this problem!
Thank you very much.
Laura
أكثر...