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 have a map application using GXP which displays different data coming from different WMS sources. Some geometry is only available on certain zoomlevels (available via MaxScaleDenominator on the GetCapabilities). It should be only possible to select an overlay layer when you are at that minimum zoom level, otherwise it should be disabled. Any idea on how to do this?

share|improve this question

Try comparing the Map's current resolution (map.getResolution() or layer.getResolution()) to the layer's minimum resolution (wmsLayer.minResolution)

non tested sudo code:

if(map.getResolution() < wmsLayer.minResolution){
     //disable layer selection.
     //enable layer selection.


Please take a look at this wiki page.

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.