[OpenLayers-Dev] Scale dependencies with TileCache

fporcelli at taic.net fporcelli at taic.net
Tue Sep 4 15:28:20 EDT 2007


Chris --

I passed the resolutions array to TileCache but I get pink tiles when the layer is turned on outside the boundaries of the resolutions array. The layer does render properly when zoomed in at the supported resolution. My units are decimal degrees, and my TileCache layer looks like so.

I'm scratching my head on this one...

[testlayer]
type=WMSLayer
url=http://gis.test.com/cgi-bin/dir/test_wms.cgi
transparent=true
extension=png
layers=1
resolutions=0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125

Regards,

Frank


-----Original Message-----
From: Christopher Schmidt <crschmidt at metacarta.com>
Sent: Tue, September 4, 2007 12:22 pm
To: fporcelli at taic.net
Cc: dev at openlayers.org
Subject: Re: [OpenLayers-Dev] Scale dependencies with TileCache

On Tue, Sep 04, 2007 at 12:05:28PM -0400, fporcelli at taic.net wrote:
> Hello --
> 
> I was interested in creating a cached layer with scale dependencies using TileCache. The layer configuration using just OpenLayers works fine and is shown below. However I want to cache this layer and have tileCache only request tiles from within the minScale and maxScale parameters. Is this possible?

TileCache needs to be handed a list of resolutions. It's not clear to me
what your units, maxExtent, etc. are. You should set your TileCache
layer up to have the *resolutions of the base layer* which exist between
those scales.

OpenLayers.Util.getResolutionFromScale may be useful.

Regards,
-- 
Christopher Schmidt
MetaCarta




More information about the Dev mailing list