[Tilecache] Easy way to serve large JPG images with TileCache?

Alex Quinn senorsaru at yahoo.com
Thu Jul 12 11:29:18 EDT 2007


Chris,

Thanks a lot for the tip and the EXAMPLES file.  That was exactly what I needed.  For the record, I was able to get this working by doing the following:

1. Install Python, Python Image Library (PIL), Apache, and TileCache, in that order.  Configure Apache as described in the README.
2. For Windows, I had to change "#!/usr/bin/python" to "c:/Python/python.exe -u" at the top of tilecache.cgi.  This is also in the README.
3. Make sure it works with the WMS layer that comes configured by default.
4. Add something like the following to the tilecache.cfg file:
        [myMap]
        type=ImageLayer
        file=c:/myImages/myFavoriteMapFile.jpg
5. Go into index.html and change one line to something like this:
        layer = new OpenLayers.Layer.WMS( "ImageLayer", 
                            "tilecache.cgi?", {layers: 'myMap', format: 'image/png' } );
6. Access it by something like this:
        http://localhost/tilecache-1.81/

I've got another question, but I'll stick it in a separate post to the list, just to keep the archives tidy.

Alex Quinn



----- Original Message ----
From: Christopher Schmidt <crschmidt at metacarta.com>
To: Josh Livni <josh at umbrellaconsulting.com>
Cc: tilecache at openlayers.org
Sent: Sunday, July 8, 2007 11:42:12 AM
Subject: Re: [Tilecache] Easy way to serve large JPG images with TileCache?

On Sun, Jul 01, 2007 at 04:11:53PM -0700, Josh Livni wrote:
> Alex,
> 
> I think Chris Schmidt put this demo together, which might be of 
> interest: http://tilecache.org/demos/xkcd-onlinecommunities.html
> 
> I don't know what the backend tilecache config looks like exactly, but 
> I'd guess it uses ImageLayer.  Search for the ImageLayer class in 
> Layer.py for some notes on use (maybe documented more fully somewhere 
> else, but I don't know where).

The limited documentation on the ImageLayer is available from the
http://svn.tilecache.org/trunk/tilecache/EXAMPLES, which didn't ship
with the distribution until r89 (about 60 seconds ago). Documentation
patches welcome.  

Regards,
-- 
Christopher Schmidt
MetaCarta
_______________________________________________
Tilecache mailing list
Tilecache at openlayers.org
http://openlayers.org/mailman/listinfo/tilecache





       
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting 



More information about the Tilecache mailing list