[Tilecache] Random error on tilecache 1.8.1

Gilles Bassière gilles.bassiere at makina-corpus.com
Fri Aug 24 04:07:37 EDT 2007


Hi list,

I developed a web app on my local computer and I tried unsuccessfully to 
migrate to my company server.
In my local settings tilecache.cfg, I used extent_type=loose but the 
server run tilecache 1.8.1 so I just dropped this parameter.
The weird thing is that it works randomly... I try exactly the same 
request several times and I receive sometime an image, sometime this 
message :

An error occurred: 'ANDoverviewmap'
  File 
"/var/www/sig.demo.makina-corpus.com/www/wmsc/TileCache/Service.py", 
line 401, in modPythonHandler
    host )
  File 
"/var/www/sig.demo.makina-corpus.com/www/wmsc/TileCache/Service.py", 
line 380, in dispatchRequest
    tile = WMS(self).parse(params, path_info, host)
  File 
"/var/www/sig.demo.makina-corpus.com/www/wmsc/TileCache/Service.py", 
line 115, in parse
    return self.getMap(param)
  File 
"/var/www/sig.demo.makina-corpus.com/www/wmsc/TileCache/Service.py", 
line 119, in getMap
    layer = self.service.layers[param["layers"]]

Dropping the extent_type parameter, I would have expect a "Lower left is 
outside
layer bound" error but I can't understand why I get this message since 
the layer
names in OL match TC config.

You may try the demo at 
http://sig.demo.makina-corpus.com/ol_and/index-en.html

Here's my tilecache config ...

[ANDtransportation]
type=WMSLayer
url=http://sig.demo.makina-corpus.com/cgi-bin/mapserv?map=/var/www/sig.demo.makina-corpus.com/www/ol_and/netherlands.map&;
layers=ANDbackground,ANDroadGroup,ANDlocation
extension=png
size=256,256
bbox=3.2,50.65,7.25,53.68
srs=EPSG:4326
resolutions=1.3316e-2,6.658e-3,3.329e-3,1.6645e-3,8.3225e-4,4.16125e-4,2.080625e-4,1.040312e-4,5.201562e-5,2.600781e-5,1.300391e-5,6.501953e-6
metaTile=true
metaSize=5,5
metaBuffer=50

[ANDoverviewmap]
type=WMSLayer
url=http://sig.demo.makina-corpus.com/cgi-bin/mapserv?map=/var/www/sig.demo.makina-corpus.com/www/ol_and/netherlands.map&;
layers=ANDbackground,ANDroadGroup
extension=png
size=64,64
bbox=3.2,50.65,7.25,53.68
srs=EPSG:4326
resolutions=2.6632e-1,1.3316e-1,6.658e-2,3.329e-2,1.6645e-2,8.3225e-3,4.16125e-3,2.080625e-3,1.040312e-3,5.201562e-4,2.600781e-4,1.300391e-4
metaTile=true
metaSize=5,5
metaBuffer=10



... and my OL config

// Configuration option 
-----------------------------------------------------
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;

// Default values 
-----------------------------------------------------------
var urlTC = ["http://sig1.demo.makina-corpus.com/wmsc/tilecache.py?",
             "http://sig2.demo.makina-corpus.com/wmsc/tilecache.py?",
             "http://sig3.demo.makina-corpus.com/wmsc/tilecache.py?",
             "http://sig4.demo.makina-corpus.com/wmsc/tilecache.py?"];

// Map options 
--------------------------------------------------------------
var optionsSet = {
   maxExtent: new OpenLayers.Bounds(3.2, 50.65, 7.25, 53.68),
   resolutions: [1.3316e-2, 6.658e-3, 3.329e-3, 1.6645e-3, 8.3225e-4, 
4.16125e-4, 2.080625e-4, 1.040312e-4, 5.201562e-5, 2.600781e-5, 
1.300391e-5, 6.501953e-6],
   units: "degrees",
   tileSize: new OpenLayers.Size(256, 256),
   projection: "EPSG:4326",
   theme: "./include/customOL.css",
   controls: []
}
var overviewOptionsSet = {
   maxExtent: new OpenLayers.Bounds(3.2, 50.65, 7.25, 53.68),
   resolutions: [2.6632e-1, 1.3316e-1, 6.658e-2, 3.329e-2, 1.6645e-2, 
8.3225e-3, 4.16125e-3, 2.080625e-3, 1.040312e-3, 5.201562e-4, 
2.600781e-4, 1.300391e-4],
   units: "degrees",
   tileSize: new OpenLayers.Size(64, 64),
   projection: "EPSG:4326",
   theme: "./include/customOL.css",
   controls: []
}

// Map definition 
-----------------------------------------------------------
var map = new OpenLayers.Map($("map"), optionsSet);

// Layers definition ----------------------------------------------------
var cachedLayers = new OpenLayers.Layer.WMS("Netherlands road map", 
urlTC, {layers: "ANDtransportation", format: "image/png"}, {isBaseLayer: 
true, reproject: false});
var overviewLayer = new OpenLayers.Layer.WMS("Overview map", urlTC, 
{layers: "ANDoverviewmap", format: "image/png"}, {isBaseLayer: true, 
reproject: false});

// Map-Layers binding 
-------------------------------------------------------
map.addLayer(cachedLayers);

// UI controls 
--------------------------------------------------------------
map.addControl( new OpenLayers.Control.MouseDefaults() );
map.addControl( new OpenLayers.Control.PanZoomBar() );
map.addControl( new OpenLayers.Control.MousePosition() );
map.addControl( new OpenLayers.Control.Scale() );
map.addControl( new OpenLayers.Control.OverviewMap({ div: 
$("overviewBody"), layers: [overviewLayer], mapOptions: 
overviewOptionsSet }) );

// Prepare map for output 
---------------------------------------------------
map.setCenter( new OpenLayers.LonLat(4.9, 52.37), 4, false, false );


Any idea ?

-- 
Gilles Bassiere
MAKINA CORPUS
30 rue des Jeuneurs
FR-75011 PARIS
http://www.makina-corpus.com




More information about the Tilecache mailing list