Hello i need your help.

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:

var options = { maxExtent: bounds, maxResolution: 600, numZoomLevels: 10};

layer1 = new OpenLayers.Layer.WMS("OpenLayers WMS",
"http://127.0.0.1/cgi-bin/mapserv.exe?";, { layers: "uk", map:
'/ms4w/apps/openlayers-2.5/data/uk2.map',
minZoomLevel: 1, maxZoomLevel: 4 },
      { gutter: 15 });


layer2 = new OpenLayers.Layer.WMS("OpenLayers WMS",
"http://127.0.0.1/cgi-bin/mapserv.exe?";, { layers: "UK250", map:
'/ms4w/apps/openlayers-2.5/data/uk2.map',
minZoomLevel: 5, maxZoomLevel: 10},
      { gutter: 15 });

      map.addLayer(Layer1, Layer2);
      map.zoomToExtent(bounds);
      map.setCenter(bounds);
      map.zoomToMaxExtent();

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.

Any help much appreciated

Cheers
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to