[OpenLayers-Users] Trying to get TileCache working with OpenLayers

Christopher Schmidt crschmidt at metacarta.com
Wed Aug 1 00:03:50 EDT 2007


On Tue, Jul 31, 2007 at 08:56:19PM -0500, David Fawcett wrote:
> I have a simple OpenLayers app that I am trying to get working with
> TileCache.  The layer is a MapServer served WMS layer.  The image is
> 500x500.  I am getting pink tiles, no images for the tilecache layer.  Below
> is quite a bit of info, let me know any other info is needed to diagnose.
> 
> The URL is:  http://www.flatlandmaps.com/schooldistricts/dev2distinfo.html
> 
> The data is in EPSG:26915 (meters)
> 
> Here are the map and layer definitions from the html file:
>     var map = new OpenLayers.Map('map', {'projection':'EPSG:26915',
> 'units':'meters',
>                   'maxExtent': new OpenLayers.Bounds
> (485662,4775700,720470,4989969),
>                    'maxResolution': 469.616 } );
>     var districts = new OpenLayers.Layer.WMS( "School Districts", "
> http://www.flatlandmaps.com/tc/tilecache-1.4/tilecache.cgi?", {layers:
> 'tcdistricts'});
> 
> Here is the layer entry from tilecache.cfg:
> [tcdistricts]
> type=WMSLayer
> url=
> http://www.flatlandmaps.com/cgi-bin/mapserv?map=/var/www/flatlandmaps.com/maps/schooldist/schooldist.map
> layers=districts
> extension=png
> metaTile=true
> maxResolution=469.616
> srs=EPSG:26915
> metaBuffer=10
> bbox=485662,4775700,720470,4989969

You're missing an important piece of information in your tilecache.cfg
-- specifically, the cache setting.

I think if you were using a more recent version of TileCache, the error
reporting might be better, but if you run curl on the URL you offered,
you will see that it's a 500, and when you look in the apache error.log,
you will find information telling you that tc could not make the
directory /flatlandmaps.com.

The Cache directory is absolute -- you should put it inside some
directory that the apache server has write access to, like
/tmp/flatlandmaps or something similar.
 
(Yes, I cheated -- flatlandmaps is on my server, so I have more
information than the rest of you.) 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list