<div>Okay. What am I doing wrong?</div>
<div> </div>
<div>Here is how I define this layer without tilecache:</div>
<div>
<p> var basemap = new OpenLayers.Layer.WMS( "Canada", <br> "<a href="http://wms.cits.rncan.gc.ca/wms-bin/wms.cgi">http://wms.cits.rncan.gc.ca/wms-bin/wms.cgi</a>?",<br> {<br>
layers: 'DNEC_50K:ELEVATION/ELEVATION', <br> format: 'image/gif'<br> },<br> {<br> maxResolution: 156543.0339,<br> maxExtent: new
OpenLayers.Bounds(-3000000, -1500000, 6000000, 4500000),<br> projection:"EPSG:42304", // Used in WMS/WFS requests. <br> units: "m" // Only neccesary for working with scales.
<br> } );<br>.....<br> map.setCenter(new OpenLayers.LonLat(-868292.02070, 1269042.35410), 9);</p>
<p>I have no idea what to put for maxResolution but the above value works. Is there a set max resolution for a meter layer? How do you calculate the max resolution?</p>
<p>Now I try and put this into tilecache with the following:</p>
<p> [3]<br> type=WMSLayer<br> url=<a href="http://wms.cits.rncan.gc.ca/wms-bin/wms.cgi">http://wms.cits.rncan.gc.ca/wms-bin/wms.cgi</a>?<br> extension=gif<br> bbox=-3000000, -1500000, 6000000, 4500000<br> maxResolution=156543.0339
<br> layers=DNEC_50K:ELEVATION/ELEVATION</p>
<p>Then in the html</p>
<p> map = new OpenLayers.Map('map');<br> baseLayer = new OpenLayers.Layer.WMS( "Canada", <br> "tilecache.cgi?", <br> {layers: '3', <br> format: 'image/gif' },<br>
{units: 'm', <br> maxResolution: 156543.0339,<br> maxExtent: new OpenLayers.Bounds(-3000000, -1500000, 6000000, 4500000),<br> projection:"EPSG:42304",<br> isBaseLayer : true
<br> } );</p>
<p>.....<br> map.setCenter(new OpenLayers.LonLat(-868292.02070, 1269042.35410), 9);</p>
<p>I am getting white tiles with no color. Not a pink no tile found but simply white tiles. So the service is returning a part of the earth where it does not have a map. What have I missed?</p>
<p>Thanks,</p>
<p>Linda Rawson </p></div>