[Tilecache] threshold

Eric Lemoine Eric.Lemoine at camptocamp.com
Wed Mar 14 09:47:43 EDT 2007


On 3/14/07, Schuyler Erle <sderle at metacarta.com> wrote:
> On Wed, 2007-03-14 at 13:59 +0100, Eric Lemoine wrote:
> >
> > I just did a quick try and it doesn't work. The WMS server gives me a
> > white baselayer image (I guess white is the actual image's background
> > color).
>
> Maybe someone's asked this before, but do you have a link we can look
> at? Configuration files? et cetera?

Unfortunately I can't provide a link at this point. The whole thing is
installed on a server connected to our intranet.

Below are my tilecache.cfg file and an excerpt of my OpenLayers app.
"cadastre" is  the baselayer, and "train" is the overlay.

tilecache.cfg
----------------

[cache]
type=DiskCache
base=/tmp/tilecache

[cadastre]
type=WMSLayer
url=http://localhost:8080/cgi-bin/mapfile/mapserv_wms
layers=departements,geosignal_25k,geosignal_5k,cache_defaut,voiePrincipale,limDep,hydro,communes_idf,arrondissement_75,parcelles_75,parcelles_92,batiments_
75,batiments_92,voies,voies92,adressp,cache
bbox=534209,2346013,690964,2471788
srs=EPSG:27582
resolutions=0.3305525992793742,0.6614579761460261,1.3229159522920522,2.6458319045841043,5.291663809168209,10.583327618336417,21.166655236672835,42.33331047
334567,84.66662094669134,169.33324189338268,251.5498224964292
extension=jpeg
debug=on

[train]
type=WMSLayer
url=http://localhost:8080/cgi-bin/mapfile/mapserv_wms?transparent=true
layers=gare,voies_fer
bbox=534209,2346013,690964,2471788
srs=EPSG:27582
resolutions=0.3305525992793742,0.6614579761460261,1.3229159522920522,2.6458319045841043,5.291663809168209,10.583327618336417,21.166655236672835,42.33331047334567,84.66662094669134,169.33324189338268,251.5498224964292
extension=png
debug=on

app
-----

var scales = [ 937, 1875, 3750, 7500, 15000, 30000, 60000, 120000,
240000, 480000, 713055 ];
var options = {
  projection: "EPSG:27582",
  units: 'm',
  maxExtent: new OpenLayers.Bounds(
    534209.000000, 2346013.000000,
    690964.000000, 2471788.000000),
  maxResolution: 'auto',
  maxZoomLevel: 8,
  scales: scales,
  theme: 'default',
  controls: []
};

map = new OpenLayers.Map($('mainmap_container'), options);
layer = new OpenLayers.Layer.WMS(
  'Cadastre',
  tileCacheUrl,
  { layers: [ 'cadastre' ] },
  { buffer: 1, isBaseLayer: true }
);
map.addLayer(layer);

layer = new OpenLayers.Layer.WMS(
  'Train',
  tileCacheUrl,
  { layers: [ 'train' ], transparent: true, format: "image/png" },
  { buffer: 1, isBaseLayer: false }
);
layer.setVisibility(false);
map.addLayer(layer);


-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Tilecache mailing list