[GIS] Make OpenLayers request WMS tiles only within a certain bounds

mapsopenlayers-2web-mappingwms

Is there a way to actually tell OpenLayers not to request tiles out of particular bounds?

I want the rest of map and other layers still accessible, so maxExtent on map is not an option for me. I just want to restrict one WMS layer to particular bounds. If view port is inside the bounds and user zooms in fine, OpenLayers requests new tiles! but if viewport is outside, the WMS should only fill the bounded area with tiles from that WMS layer.

Does that make sense or is that even possible?

Best Answer

You should use maxExtent option on layer level.