[OpenLayers-Users] what does this error mean?
Christopher Schmidt
crschmidt at metacarta.com
Tue May 29 16:57:58 EDT 2007
On Tue, May 29, 2007 at 02:49:38PM -0600, Gregor Mosheh wrote:
> [cities]
> debug=false
> extension=gif
> type=WMSLayer
> url=http://localhost/cgi-bin/mapserv?map=/maps/wms/wms.map
> layers=cities
> bbox=-124.15456,40.41142,-123.7844,40.61528
> maxResolution=1.40625
>
> These last 2 are what fixed it, and are what I don't get.
>
> Why would tilecache need to know the max extent? The WMS server will
> gladly serve up -180,-90,180,90 without an error (though of course
> Humboldt County isn't in fact visible). Is this a matter of OL making a
> request that TC refuses to serve, or what?
> And what is the maxResolution used for on TC's part?
Yes. TileCache only serves tiles in the setup you specify. The default
OpenLayers maxResolution is 1.40625. The Default TileCache maxResolution
is the width of the bounding box / 512 -- at the 'whole world', that's
.703125, at your bbox, it's much much smaller than that.
>
> >Also, for your overlays, add a 'reproject: false' option if they're tc
> >overlays:
>
> Interesting; that does fix it and seems to be necessary. What does the
> reproject:false option accomplish? It wasn't necessary when I first set
> this stuff up and had it working, but evidently is necessary now...
reprojection is a functionality that makes sense for the commercial
baselayers, but not for a wms baselayer. It's on by defaul, and
shouldn't be. It ends up modifying the MWS requests by more than a
single pixel, which TileCache then rejects as being an invalid tile --
you didn't notice that in the past, because the tiles are 'close enough'
that they look right normally.
This part is in the README for TileCache, as is info about
maxResolutions, admittedly relatively small:
"""
The most important thing to do is to ensure that the OpenLayers Layer
has the same resolutions and bounding box as your TileCache layer. You
can define
the resolutions in OpenLayers via the 'resolutions' option or the
'maxResolution'
option on the layer. The maxExtent should be defined to match the bbox
parameter
of the TileCache layer.
If you are using TileCache for overlays, you should set the 'reproject'
option
on the layer to 'false'.
"""
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list