[Tilecache] maxExtent and BBOX setting

Steve.Toutant at inspq.qc.ca Steve.Toutant at inspq.qc.ca
Thu Jul 23 14:47:08 EDT 2009


no error...
I think the problem is that my bbox doesn't fit the grid.

If I set everything (layer maxExtent = map maxExtent = bbox .cfg and bbox 
tilecache_seed.py) to the same maxExtent of my map it is working well.
But the maxExtent of my map covers the country. My layer covers the 
province.

So I thought it was a good thing to specify a smaller extent so there are 
less images requested to the server when executing tilecache_seed.py.
Does it make sense to specify a smaller extent for the tilecache or I 
should not bother with that?

If it makes sense please send a link to some documentation on how set the 
new extent to the tilecache grid.

Thanks
Steve


Steve Toutant, M. Sc.
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3 
Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant at inspq.qc.ca
http://www.inspq.qc.ca
 




Alexandre Dube <adube at mapgears.com>@openlayers.org 
Envoyé par : tilecache-bounces at openlayers.org
23/07/2009 01:23 PM

A
Steve.Toutant at inspq.qc.ca
cc
tilecache at openlayers.org
Objet
Re: [Tilecache] maxExtent and BBOX setting








Hi,

  Using Firebug, if you open the url to a requested tile in a new 
tab/window, do you see an error message ?

Alexandre

Steve.Toutant at inspq.qc.ca wrote:
>
> Hello,
> I read several posts on bbox and maxExtent settings but I still can't 
> make tilecache works.
> I'm confuse with maxExtent, maxResolution and BBOX of OpenLayers 
> mapOptions, OpenLayers layer definition, tilecache.cfg and 
> tilecache_seed.py.
>
> I need help for clarifying this please.
> Below are the different settings.
> thanks
> Steve
>
> ************************OpenLayers 
> Options*********************************
>
> var mapOptions = {
> projection: "EPSG:900913",//google
> displayProjection: new OpenLayers.Projection("EPSG:4326"), //Pour 
> afficher les coord lat long
> units: "m",
> maxExtent: new OpenLayers.Bounds(-9239517, 5465442, -5565974, 
> 9349764),//bbox google = bbox tilecache_seed.py
> maxResolution: "4892", //BEcause of minZoomLevel: 5 for google MAp
> controls: [],
> numZoomLevels: 20 //google
> };
> //basemap
> var googleM = new OpenLayers.Layer.Google( "Google Map", { 
> minZoomLevel: 5, type: G_NORMAL_MAP, 'sphericalMercator': true} );
>
> ************************OpenLayers Layer definition 
> *********************************
> createTileCacheLayer
> (
>         'ilotsMiniTC', 'http://10.2.192.247/tilecache/dataWms', 
> 'ilotsMiniTC',
>         {
>                 REPROJECT: 'false',
>                 format:"image/gif",
>                 transparent: "true",
>                 maxExtent: new 
> OpenLayers.Bounds(-9239517,5465442,-7987172.729,5465442), // = bbox of 
> tilecache.cfg
>                 maxResolution: 4892,
>                 attribution:'ICU - INSPQ et <a 
> href="http://www.santepub-mtl.qc.ca/" target="_blank">DSP de 
> Montréal</a>'
>         }
> );
>
> ************************TILECACHE.CFG*********************************
>
> [ilotsMiniTC]
> type=WMSLayer
> 
url=http://localhost/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante_chaleur.map& 

>
> extent_type=loose
> levels=15
> #Du niveau inférieur au niveau supérieur
> 
layers=ilotsLavalMini,ilotsMtlMini,ilotsMonteregieMini3,ilotsMonteregieMini1,ilotsMonteregieMini2,ilotsEstrieMini2,ilotsEstrieMini1,ilotsGatMini,ilotsLauMini2,ilotsLauMini1,ilotsLanMini,ilotsMauMini1,ilotsMauMini2,ilotsMauMini3,ilotsChauMini2,ilotsQcMini2,ilotsChauMini1,ilotsQcMini1 

>
> extension=gif
> srs=EPSG:900913
> #metaTile=true
> metaBuffer=30
> #metaSize=10,10
> maxResolution=4892
> bbox=-9239517,5465442,-7987172.729,5465442
> #BBOX = maxExtent of OL Layer definition
>
> ************************tilecache_seed.py************************
> BBOX = maxExtent of OL map options
> tilecache_seed.py -f ilotsMiniTC 0 2 -b "-9239517, 5465442, -5565974, 
> 9349764"
>
>
>
> /Steve Toutant, M. Sc./
> Analyste en géomatique
> Secteur environnement
> Direction des risques biologiques, environnementaux et occupationnels
> Institut national de santé publique du Québec
> 945, avenue Wolfe
> Québec, Qc G1V 5B3
>
> Tél.: (418) 650-5115 #5281
> Fax.: (418) 654-3144_
> __steve.toutant at inspq.qc.ca_ <mailto:steve.toutant at inspq.qc.ca>_
> __http://www.inspq.qc.ca_ <http://www.inspq.qc.ca/>
>
> 
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache
> 


-- 
Alexandre Dubé
Mapgears
www.mapgears.com

_______________________________________________
Tilecache mailing list
Tilecache at openlayers.org
http://openlayers.org/mailman/listinfo/tilecache



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20090723/c612c2d6/attachment.html


More information about the Tilecache mailing list