I want to change layers visibility while I zoom , here are my screenshots.

where is my error ?


You appear to be trying to turn off/on Layer Visibility in GeoWebCache which is integrated with GeoWebServer. Geowebcache is used for caching tiles to improve speed, not controlling layer visibility

There are two ways to handle layer visibility

  1. Style the Layer using SLD in GEoserver, using<MinScaleDenominator></MinScaleDenominator> and <MaxScaleDenominator></MaxScaleDenominator> to control the display of features

  2. Use the OpenLayers setVisibility() function to turn he layers off.

  • Thank you for your response @MarkC , but my purpose is show my layer between different zoom values. For example if my 13<zoom value<22 show me my layer else don't show me. – OzkanCiftci Oct 2 '14 at 10:47
  • Well, that is exactly what I am describing .. two ways to do exactly that .. – Mark Cupitt Oct 2 '14 at 11:01
  • This is exactly what I want to do also, IE disable layers depending on zoom level such as roads. I've found in documentation but cannot see where to edit ? Do I need to manually edit the XML ? Is there a way within the GUI? – wired00 Mar 6 '17 at 21:27
  • ignore my comment, I found it. I need to set using something like <MaxScaleDenominator>125383.0</MaxScaleDenominator> within the style editor of whichever feature i want to appear/disappear such as roads/rivers – wired00 Mar 7 '17 at 0:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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