[Tilecache] tilecache problem with a projection in meters

olivier.terral olivier.terral at geomatys.fr
Wed Mar 7 08:03:44 EST 2007


oh it's mistake, too more test :)

I've cleanup my files now I 've a new error:

var mapOptions = {
                 controls:[],
               projection: "EPSG:54004",
               units: "m",
               maxExtent: new 
OpenLayers.Bounds(-19977777,-7481525,20037508,18356400),
               maxResolution:47524
           };
              
  map = new OpenLayers.Map($('mainMap'),mapOptions);

layer definition:

var layerOptions = {
                 visibility:true,
                 transparent:"TRUE",
                 projection:"EPSG:54004",
                 maxExtent: new 
OpenLayers.Bounds(-19977777,-7481525,20037508,18356400
),
                 maxResolution: 47524
      };
layer= new OpenLayers.Layer.WMS("ocean","http://localhost/wms-c",
               {
                   layers: "ocean",
                   transparent:"TRUE",
                   format:image/png,

               },
               layerOptions
           );

map.addLayers(layer);


[ocean]
type=WMSLayer
url=http://localhost/wms
extension=gif
srs=EPSG:54004                  
bbox=-19977777,-7481525,20037508,18356400
maxResolution=47524


Error in browser:
L'image
“http://localhost/wms-c?LAYERS=ocean&TRANSPARENT=TRUE&FORMAT=image%2Fgif&STYLES=default&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A54004&BBOX=-7811633%2C4684619%2C4354511%2C16850763&WIDTH=256&HEIGHT=256”
ne peut être affichée car elle contient des erreurs.



error in Apache:
[Wed Mar 07 14:01:06 2007] [error] [client 127.0.0.1] Cache hit: -7811633.0,4684619.0,4354511.0,16850763.0, Tile: x: 1, y: 1, z: 0, time: 0.0, debug: True\r
[Wed Mar 07 14:01:07 2007] [error] [client 127.0.0.1] Cache hit: -7811633.0,4684619.0,4354511.0,16850763.0, Tile: x: 1, y: 1, z: 0, time: 0.0, debug: True\r
[Wed Mar 07 14:01:09 2007] [error] [client 127.0.0.1] Cache hit: -7811633.0,4684619.0,4354511.0,16850763.0, Tile: x: 1, y: 1, z: 0, time: 0.0, debug: True\r
[Wed Mar 07 14:01:12 2007] [error] [client 127.0.0.1] Cache hit: -7811633.0,4684619.0,4354511.0,16850763.0, Tile: x: 1, y: 1, z: 0, time: 0.0, debug: True\r




Christopher Schmidt a écrit :
> 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,
>>>  
>>>       
>>     
>
>   




More information about the Tilecache mailing list