I would like to improve the performance of my application that displays thematic maps using OpenLayers, Google Maps & MapServer with TileCache (http://tilecache.org). Therefore I followed the installation instructions and installed TileCache successfully.
Within my application I have the following code to embed a new layer on top of my basemap that works fine so far:
var wms_layer = new OpenLayers.Layer.WMS("WMS layer","localhost/cgi-bin/mapserv"
{
map: [path_to_my_mapfile],
layers: [list of layers],
transparent:true
});
my_map.addLayer(wms_layer);
The documentation basically says that the URL passed to the OpenLayers.Layer.WMS constructor must point to the TileCache script, i.e. tilecache.cgi or tilecache.py.
var wms_layer = new OpenLayers.Layer.WMS("WMS layer","localhost/cgi-bin/tilecache/tilecache.cgi"
{
map: [path_to_my_mapfile],
layers: [list of layers],
transparent:true
});
my_map.addLayer(wms_layer);
Unfortunately it does not work, meaning that I can see no maps when I switch the url. Any idea what could be wrong? Maybe it is a configuration setting I missed in tilecache.cfg but I could not figure out what the right settings are.
Does anybody have some experiences with this issue?