[Tilecache] tilecache problem with a projection in meters

Christopher Schmidt crschmidt at metacarta.com
Wed Mar 7 07:24:52 EST 2007


On Wed, Mar 07, 2007 at 09:58:53AM +0100, olivier.terral wrote:
> Yep,
> 
> Map definiton:

Your maxResolution doesn't match. Either round the one in OpenLayers, or
change the one in TileCache.

-- Chris

> var mapOptions = {
>                  controls:[],
>                projection: "EPSG:54004",
>                units: "m",
>                maxExtent: new 
> OpenLayers.Bounds(-19977777,-8938600.163301663,20037508,19813475.16330166),
>                maxResolution:47524.091449
>            };
>               
>   map = new OpenLayers.Map($('mainMap'),mapOptions);
> 
> layer definition:
> 
> var layerOptions = {
>                  visibility:true,
>                  transparent:"TRUE",
>                  projection:"EPSG:54004",
>                  maxExtent: new 
> OpenLayers.Bounds(-19977777,-8938600.163301663,20037508,19813475.16330166),
>                  maxResolution: 47524.091449
>       };
> layer= new OpenLayers.Layer.WMS("Oceans","http://localhost/wms-c",
>                {
>                    layers: "ocean",
>                    transparent:"TRUE",
>                    format:image/png,
> 
>                },
>                layerOptions
>            );
> 
> map.addLayers(layer);
> 
> 
> "http://localhost/wms" is a mapserver who works fine
> "http://localhost/wms-c" is the TileCache cgi  for the wms of this mapserver
> 
> Thanks for your help Christopher :)
> 
> 
> Christopher Schmidt a ?crit :
> >On Tue, Mar 06, 2007 at 05:07:37PM +0100, olivier.terral wrote:
> >  
> >>Hi,
> >>
> >>I test Tilecache but I've a problem.
> >>
> >>Crschimdt said me maxResolution='auto' creates problem so I create my 
> >>layers and map with maxResolution=47524   ( It's a world mercator 
> >>projection in meters) and a maxExtent
> >>
> >>for information wms works good, it's a mapserver wms and the layer is 
> >>displayed correctly
> >> but with tilecache it bugs
> >>    
> >
> >We need your OpenLayers config -- layer and map constructors -- to debug
> >further.
> >
> >Regards,
> >  
> 
> 

-- 
Christopher Schmidt
MetaCarta



More information about the Tilecache mailing list