Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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,
        units: 'm'

And I have this layer WMS:

 var layer = new OpenLayers.Layer.WMS("layer1",wms_address,

//        minResolution: 14.035643,
//        maxResolution : 7.01782148        

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.


share|improve this question
No one can help me please? I'm would like to know if I'm doing some errors in my code....Thanks – Laura Feb 8 '13 at 14:47
does your map show up with out the scale settings? – iant Feb 8 '13 at 15:23
@iant The map does show up with the scale settings, but the layer does not show up if I put the max or min Scale values options of the layer.If I don't set min max Scale for the layer, I see the layer on the map. My problem is that I need to set scale values for each layer that I add on the map. So what am I doing wrong? Please help me... – Laura Feb 11 '13 at 9:49
it sounds as if your scale settings are wrong - try setting just min or max and working from there – iant Feb 11 '13 at 10:43
I finally solved my problem some time ago by using the arrey "resolution" instead of setting maxScale or minScale values. It seems that OpenLayer does not recognize the layer visibility through these params. Thanks. – Laura Jul 10 '13 at 11:08

Visit maxScale or minScale dont working in vector (from wfs) layer for a similiar question.


should be changed to:

maxScale: 1/25000,
minScale: 1/50000
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.