[Tilecache] BBOX settings
Christopher Schmidt
crschmidt at metacarta.com
Fri Jan 18 06:56:24 EST 2008
On Fri, Jan 18, 2008 at 12:44:23AM -0800, R. Ortner wrote:
>
> Hi,
>
> trying to set up Tilecache with an OL Application. This is my OL part:
>
>
>
> > var options = { theme: null, //This will disable the default method of
> > loading the stylesheet and allow you to declare style rules in your own
> > linked stylesheets or style tags
> > scales: [1000000, 600000, 250000, 125000, 75000, 30000, 10000],
> > projection:'EPSG:31258', 'units':'m',
> > maxExtent: new OpenLayers.Bounds(390730, 119473, 594760, 238680),
> > maxResolution:1337.385346,
> > minResolution:13.373853,
> >
> > resolutions:[1337.385346,802.431207,334.346336,167.173168,100.303901,40.121560,13.373853],
> > minExtent: new
> > OpenLayers.Bounds(491033.1467577341,177885.87564293714,494456.8532422659,180267.12435706286),
> > controls: [new OpenLayers.Control.MouseDefaults()] // Erweiterte
> > Pan/Zoomkontrolle -> Zoombar
> > };
> >
>
> and this is my tilecache.cfg part:
>
>
>
> > [PolitischeGemeinden]
> > type=WMSLayer
> > layers=PolitischeGemeinden
> > url=http://gis.ktn.gv.at/wmsconnector/com.esri.wms.Esrimap/geoland2?transparent=true
> > extension=png
> > debug=off
> > srs=EPSG:31258
> > levels=7
> > extent_type=loose
> > BBOX=390730, 119473, 594760, 238680
> > #321559.67577340844,60014.06429371526,663930.3242265915,298138.9357062847
> > maxresolution=1337.385346
> > resolutions=1337.385346,802.431207,334.346336,167.173168,100.303901,40.121560,13.373853
For both OpenLayers and TileCache, pease set only one of 'min/max'
Resolutino and a resolutions array. You should not need both, and
they'll only confuse the issue. In OpenLayers, this is also true of
'scales'. drop the 'scales', drop the min/maxResoltuion, and just go
with 'resolutions=' in both cases.
> The Problem is now, with the BBOX like the maxExtent from the OL file, I get
> only Pink Tiles and when I call this Layer as GetMap Request I get this
> error:
>
>
> > for the first ZoomLevel:
> > An error occurred: Current x value 321559.675773 is too far from tile
> > corner x 390730.000000
Well, your bbox= and your maxResolution aren't equal. It looks like they
*were*, then you commented out the right one in favor of an incorrect
one. Make the 'bbox' match the maxExtent in OpenLayers.
> How can I set the BBOX (in the tilecache.cfg) to several values so that for
> every ZoomLevel the correct BBOX value is used?
> Or can I set the BBOX to a "standard" value for all ZoomLevels?
I'm not understanding you. Your maxExtent and your bbox should match.
You don't set a bbox 'per zoom level', you set one for your map.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Tilecache
mailing list