[Tilecache] couldn't calculate tile index for laye

Christopher Schmidt crschmidt at metacarta.com
Wed Mar 28 07:19:28 EDT 2007


On Wed, Mar 28, 2007 at 05:09:12PM +0800, GMail wrote:
> Greetings,
>     I've got problem using openlayers+tilecache+ms4w. Codes follow:
> 
> OpenLayers:
>         var options4326 = {
>                  //maxResolution: 1,
>                  //maxZoomLevel: 8,
>                  maxExtent: new OpenLayers.Bounds(109.659395,20.208809,117.205135,25.452341),
>                  projection:"EPSG:4326",
>                  controls: [new OpenLayers.Control.MouseDefaults()]
>                  };
>         var map = new OpenLayers.Map('map', options4326);
> 
>         var gdhk_tilecache = new OpenLayers.Layer.WMS(
>             "WMS (EPSG 4326); tilecache",
>             "http://localhost/tilecache/tilecache.cgi", {
>               layers: 'gdhk',
>               format: 'image/gif'}
>             );
> 
> tilecache.cfg:
> [gdhk]
> type=WMSLayer
> url=http://localhost/cgi-bin/en/mapserv
> extension=gif
> #bbox=109.659395,20.208809,117.205135,25.452341
> #levels=8
> 
> It always return errors "couldn't calculate tile index for layer", but I can see the image by:
> http://localhost/tilecache/tilecache.cgi?layers=gdhk&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&WIDTH=256&HEIGHT=256&BBOX=109.659395,20.208809,117.205135,25.452341

If your'e using a non-standard bbox, you should have two parameters in
*each* of your map config and tilecache config, which need to match:

 * bbox / maxExtent
 * maxresolution / maxResolution

If you set your maxResolution to 1 in OpenLayers, and set your
maxresolution to 1 in TileCache, I think you'll be able to get started. 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Tilecache mailing list