[Tilecache] Help with tilecache UTM layer.

Linda Rawson linda.rawson at gmail.com
Thu Oct 25 12:23:58 EDT 2007


Okay.  What am I doing wrong?

Here is how I define this layer without tilecache:

            var basemap = new OpenLayers.Layer.WMS( "Canada",
         "http://wms.cits.rncan.gc.ca/wms-bin/wms.cgi?",
         {
                 layers: 'DNEC_50K:ELEVATION/ELEVATION',
                 format: 'image/gif'
         },
         {
                 maxResolution: 156543.0339,
                 maxExtent: new OpenLayers.Bounds(-3000000, -1500000,
6000000, 4500000),
                   projection:"EPSG:42304",     // Used in WMS/WFS
requests.
                   units: "m"                  // Only neccesary for working
with scales.
         } );
.....
 map.setCenter(new OpenLayers.LonLat(-868292.02070, 1269042.35410), 9);

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?

Now I try and put this into tilecache with the following:

 [3]
 type=WMSLayer
 url=http://wms.cits.rncan.gc.ca/wms-bin/wms.cgi?
 extension=gif
 bbox=-3000000, -1500000, 6000000, 4500000
 maxResolution=156543.0339
 layers=DNEC_50K:ELEVATION/ELEVATION

Then in the html

 map = new OpenLayers.Map('map');
     baseLayer = new OpenLayers.Layer.WMS( "Canada",
         "tilecache.cgi?",
  {layers: '3',
   format: 'image/gif' },
          {units: 'm',
           maxResolution: 156543.0339,
           maxExtent: new OpenLayers.Bounds(-3000000, -1500000, 6000000,
4500000),
           projection:"EPSG:42304",
   isBaseLayer : true
  } );

.....
 map.setCenter(new OpenLayers.LonLat(-868292.02070, 1269042.35410), 9);

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?

Thanks,

Linda Rawson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20071025/55c54975/attachment.html


More information about the Tilecache mailing list