[Tilecache] Basic Questions

Christopher Schmidt crschmidt at metacarta.com
Tue Sep 18 20:14:58 EDT 2007


On Tue, Sep 18, 2007 at 04:10:38PM -0700, Jeffrey Johnson wrote:
> Hi There, Just started an implementation of TileCache with OpenLayers
> as UI ... but using non-spatial images.
> 
> So just the basic details ... the tilecache.cfg looks like this ...
> 
> [cache]
> type=DiskCache
> base=c:/tmp/tilecache
> 
> [test]
> type=ImageLayer
> file=C:/Capture_00039.JPG
> bbox=0,0,3648,2736
> filebounds=0,0,3648,2736
> maxresolution=4
> 
> This is the actual dimensions of the image (3648,2736) and I only want
> 4 zoom levels.
> 
> the js code with OpenLayers looks like this ...
> 
> 	function init(){
> 		map = new OpenLayers.Map( $('map'));
> 		map.addLayer(new OpenLayers.Layer.WMS("test", ["tilecache.cgi?",
> "tilecache.cgi?"], {'layers':'test'}, {maxResolution:4, maxExtent: new
> OpenLayers.Bounds(0,0,3648,2736)}));
> 		map.addLayer(test);
> 
> 
> so this works 'ok' ... when the page loads it is blank :( 

Call map.zoomToMaxExtent() to get the ball rolling.

> ... as soon
> as I drag around the tiles appear. There is a thick black border
> around the image but only on the top and right.

I expect that, but I think there's a fix in TileCache for it. Maybe some
property you can set on the layer with regard to transparency. Yeah,
maybe setting 'transparency=True' on the ImageLayer config would do it.

> Also, If I zoom in beyond the 4 levels, I get pink dead tiles.

If you right click the tiles and view them in your browser, what does it
say?

> Is there something simple I am doing wrong with the dimensions?

What makes you think that you might be? Not sure I understand.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Tilecache mailing list