<div>I have a wms layer that is the whole world. I have another wms layer that is part of the world, Canada. I want the part world to only retrieve data and show when I am in that area of the world.</div>
<div> </div>
<div>I thought I could do it with the following command on the layer (maxExtent, displayOutsideMaxExtent = false) but it is still retrieving the data all of the time. What can I do to limit it from retrieving the layer and only displaying the layer on certain lat/lon coordinates?
</div>
<div> </div>
<div><font size="2">
<p>layerOptions = [];</p><font size="2">
<p>layerOptions.push(</p></font><font color="#800000" size="2">'VEGETATION_2:BNDT_50K/NTDB_50K'</font><font size="2">);</font></font></div>
<div>var dm_wms = new OpenLayers.Layer.WMS( "Canada",</div>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p>"<a href="http://wms.cits.rncan.gc.ca/cgi-bin/cubeserv.cgi?">http://wms.cits.rncan.gc.ca/cgi-bin/cubeserv.cgi?</a>",</p>
<p>{</p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p>layers : layerOptions,</p>
<p>format : "image/jpeg",</p>
<p>transparent: "true"</p></blockquote>
<p>},</p>
<p>{ maxResolution: 0.00137329101,</p>
<p>tileSize: new OpenLayers.Size(512,512),</p>
<p>maxExtent: new OpenLayers.Bounds(-169.6464945168233,27.90109187663068,-20.01420323537291,78.92465549183306)</p>
<p>}</p></blockquote>
<p dir="ltr">); </p>
<p>dm_wms.displayInLayerSwitcher = false; </p>
<p>dm_wms.displayOutsideMaxExtent = false; </p>
<div>map.addLayer(dm_wms);</div>
<div> </div>
<div>Thanks,</div>
<div>Linda Rawson</div>