<div>Hello i need your help.</div>
<div> </div>
<div>I currently have two layers. i would like to display one layer initially then zoom in closer and display the second layer. I have been trying to do it like this:</div>
<div> </div>
<div>var options = { maxExtent: bounds, maxResolution: 600, numZoomLevels: 10};<br> <br>layer1 = new OpenLayers.Layer.WMS("OpenLayers WMS", <br>"<a href="http://127.0.0.1/cgi-bin/mapserv.exe">http://127.0.0.1/cgi-bin/mapserv.exe</a>?", { layers: "uk", map: '/ms4w/apps/openlayers-2.5/data/uk2.map', <br>
minZoomLevel: 1, maxZoomLevel: 4 },<br> { gutter: 15 });<br> <br> <br>layer2 = new OpenLayers.Layer.WMS("OpenLayers WMS",<br>"<a href="http://127.0.0.1/cgi-bin/mapserv.exe">http://127.0.0.1/cgi-bin/mapserv.exe</a>?", { layers: "UK250", map: '/ms4w/apps/openlayers-2.5/data/uk2.map', <br>
minZoomLevel: 5, maxZoomLevel: 10},<br> { gutter: 15 });<br> <br> map.addLayer(Layer1, Layer2);<br> map.zoomToExtent(bounds);<br> map.setCenter(bounds);<br> map.zoomToMaxExtent();</div>
<div> </div>
<div>My main problem is i can only display a layer when status is DEFAULT within mapfile however i cannot hide the layer if set to this. When Set to ON the layer is not displayed atall.</div>
<div> </div>
<div>Any help much appreciated</div>
<div> </div>
<div>Cheers</div>