[OpenLayers-Users] tilecache config problem]

Christopher Schmidt crschmidt at metacarta.com
Tue Jan 9 17:13:37 EST 2007


On Tue, Jan 09, 2007 at 10:53:26PM +0100, Andrea Borruso wrote:
> Hi Bill,<br>
> thank you very much: now I'm able to generate the map. I have use your
> second option.<br>
> <div id="result_box" dir="ltr">I have some doubts about resolution
> parameter.<br>
> If I do not specify this parameter, which resolutions will be chosen?<br>

The default resolutions array, if one is not specified, assumes a top
level resolution of:

res = largerMapDimension (geographic) / 512 

With a default bounding box of -180,-90,180,90, for example, the default
max resolution is .703125. Beyond that, each layer is divided by 2, so
the next layer down is .35106125, etc.

> If I want to specify resolutions, which criteria I must follow? I kwow
> the original resolution of my base map (nearby 1 pixel = 80 meters),

Comma seperated resolutions, where resolution is 'geographic units per
pixel'. 

> I
> must choose multiples of the original resolution (160,320,640,...)? 

The default OpenLayers setup is to go from 80 (80m/pixel) to 40m/pixel,
20m/pixel, etc. so:

80,40,20,10,5,2.5,1.25,0.6125

> Do
> I must specify the same resolutions in the openlayers file to obtain
> that the final user will zoom only in cached images?<br>

Yes, but you can just specify a maxResolution:

new OpenLayers.Map('map', {'maxResolution': 80});

And OpenLayers will go down from there.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list