[OpenLayers-Dev] read-only TileCache

Tim Schaub noreply at geocartic.com
Tue Apr 3 18:43:25 EDT 2007

Ehud Shabtai wrote:
> Is it possible to use the error handler to request the tile again but
> this time from the tilecache server? This would allow fast access to
> existing tiles, without requiring the whole cache to be available.
> If I remember correctly that's how Ka-Map works if you have a web
> accessible cache.

Well, both TileCache (meaning tilecache.cgi) and ka-Map (meaning 
tile.php) check to see if a tile exists in the cache first.  If the tile 
exists, it is returned - if not, one is created.

If you are interested in having users create your cache for you, then it 
is best to use TileCache directly (through tilecache.cgi).  The 
OpenLayers.Layer.TileCache option is really only for cases where a 
disk-based cache is already created and you want to give users fast 
access to the tiles.

That said, if you wanted to create a client-side image error handler 
that redirected users to tilecache.cgi, it is certainly possible.


Also - you can configure ka-Map with the "tile_source" "cache" option. 
This makes the client side function like the OpenLayers.Layer.TileCache 
layer - requesting the images directly.  Last time I checked, there 
wasn't anything built in to switch to tile.php if this request failed. 
Could be though.

More information about the Dev mailing list