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