[Tilecache] can't find resolution index - help appreciated

Mike Stoddart stodge at gmail.com
Thu Jan 20 08:13:24 EST 2011


I'm getting the infamous resolution problem:

An error occurred: can't find resolution index for 200.704000.
Available resolutions are:
[392.0, 196.0, 98.0, 49.0, 24.5, 12.25, 6.125, 3.0625, 1.53125,
0.765625, 0.3828125, 0.19140625, 0.095703125, 0.0478515625,
0.02392578125, 0.011962890625, 0.0059814453125, 0.00299072265625,
0.001495361328125, 0.0007476806640625]

My tilecache.cfg is:

[polygons]
type=WMS
layers=polygons
mapfile=/opt/test.map
url=http://localhost/cgi-bin/mapserv
bbox=-50176,-50176,50176,50176
extension=png
srs=EPSG:4326
#resolutions=392.0, 196.0, 98.0, 49.0, 24.5, 12.25, 6.125, 3.0625,
1.53125, 0.765625, 0.3828125, 0.19140625, 0.095703125, 0.0478515625,
0.02392578125, 0.011962890625, 0.0059814453125, 0.00299072265625,
0.001495361328125, #0.0007476806640625
extent_type=loose
levels=10

My mapserver extents are:

  EXTENT         -50176 -50176 50176 50176

My openlayers code is:

        var layer = new OpenLayers.Layer.WMS( "Test WMS",
			url,
			{
				layers: 'polygons',
				/*
				resolutions: [
					392.0, 196.0, 98.0, 49.0, 24.5, 12.25, 6.125, 3.0625, 1.53125,
0.765625, 0.3828125, 0.19140625,
					0.095703125, 0.0478515625, 0.02392578125, 0.011962890625,
0.0059814453125, 0.00299072265625,
					0.001495361328125, 0.0007476806640625
				],
				*/
				minResolution: "auto",
				maxResolution: "auto",
				maxExtent: new OpenLayers.Bounds(-50176, -50176, 50176, 50176),
				format: 'image/png',
			});

I've tried uncommenting the resolutions in my javascript and in the
tilecache config file to no avail. Am I missing something rudimentary?

Thanks


More information about the Tilecache mailing list