[Tilecache] Problems with Tilecache and WMS

"tschobber tschöbbi" tschobber at gmx.at
Mon Mar 23 08:14:56 EDT 2009


Hi,

I have the following problem:

I have defined a layer in the /etc/tilecache.cfg like this (my tilecache.cgi is in /srv/www/cgi-bin/tilecahce-2.10/):

[mapserverwms_agg]
type=WMS
url= http://localhost/cgi-bin/mapserv?map=data/wms2.map
layers=land_grenzen01,layer_mapany_080305_3ba6226287c1622, bezirk_grenzen_01, land_grenzen01,staat01,fluss01, stadt01
extent_type=loose

-------------------------------------------------------
The second code shows the code snippet of openlayers.htm

--------------------------------
 var mapOptions = {maxExtent: new OpenLayers.Bounds(384619.116883103,467965.222077892,505102.701298797,534231.193506524), maxResolution:420,numZoomLevels:21,projection:"EPSG:31297"};

        function init(){
            map = new OpenLayers.Map('map',mapOptions);
            layer = new OpenLayers.Layer.WMS( "beschissenes tiledcache","http://localhost/cgi-bin/tilecache-2.10/tilecache.cgi?", {layers: 'mapserverwms_agg'} );
-------------------------------

When I remove the mapOptions Openlayers draws just the borders of the map, but all the other layers aren't drawn. If I remove the layer that draws the borders I still get the same. What am I doing wrong? I've tried an other Mapserver WMS example with Tiledcache and this one is working fine.
The strange thing is that Openlayers works with this map file without tiledcache - the map file I'm using is getting data from a pgsql/postgis database and has the projectioncode 31297 with the above maxExtent parameters and I render it with AGG. 

Here's how I declare a layer in Openlayers without Tiledcache (that's working fine):

var mapserver_agg_overlay = new OpenLayers.Layer.WMS("AGG Mapserver","http://localhost/cgi-bin/mapserv?map=/srv/www/cgi-bin/data/wms3.map",{map_imagetype:'AGG',layers: ['land_grenzen01','layer_mapany_080305_3ba6226287c1622', 'bezirk_grenzen_01', 'land_grenzen01','staat01','fluss01', 'stadt01'],format: 'image/png'},{isBaseLayer:false},{singleTile: true});


Hope you could help me.

thanks + best regards!

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01



More information about the Tilecache mailing list