[OpenLayers-Users] TileCache and Openlayers

Michael Shishcu micklesh at gmail.com
Wed Sep 30 07:58:56 EDT 2009


Hi.

Your tilecache layer is defined as WMS, so i think you can remove
mapfile=...
Now the main:
try adding levels=..., maxresolution=..., resolutions=... in your
tilecache.cfg
these settings must be the same as for openlayers map

regards, michael

2009/9/30 Rahn Hanno (rahn) <rahn at zhaw.ch>

>  I will realise the Tilecache but it doesn’t work with my base layer. For
> all other layers it works.
>
>
>
> Hello list,
>
>
>
> I have another question and perhaps somebody can help me. I try to use
> Tilecache for a better performance of my maps.
>
> I try to realise it, but in this time it will only work for my background
> layers. For my base Layer it doesn^t work.
>
>
>
> For my base layer (only polygons, “gemeinden_2008”) I write the follwing
> code in the tilecache.cfg.
>
>
>
> [gemeinden_2008]
>
> type=WMS
>
> url=
> http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map
>
> mapfile=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map
>
> layers=gemeinden_2008
>
> extension=png
>
> extent_type=loose
>
> srs=EPSG:21781
>
> bbox=555100,129900,678450,245000
>
> metaTile=true
>
>
>
> And in my OpenLayers File I define the layer like this:
>
>
>
> var layerName = (jahr <=2008) ? 'gemeinden_2008' : 'gemeinden_2009';
>
> var urlArrayTC = ["http://webgis.hsw.ch/cgi-bin/tilecache/tilecache.cgi
> ?"];
>
> var mapFile = "../htdocs/GINES/Maps/Gemeinden_Bern.map";
>
>
>
> var options1 = {
>
>                         maxExtent: new
> OpenLayers.Bounds(555100,129900,678450,245000),
>
>                         maxScale: '500',
>
>                         minScale: '458262',
>
>                         //                      fractionalZoom: true,
>
>                         resolutions:[481.8359375, 240.91796875,
> 120.458984375, 60.2294921875, 30.11474609375, 15.057373046875,
> 7.5286865234375, 3.76434326171875, 1.882171630859375, 0.9410858154296875,
> 0.47054290771484375, 0.23527145385742188, 0.11763572692871094,
> 0.058817863464355469, 0.029408931732177734, 0.014704465866088867,
> 0.0073522329330444336, 0.0036761164665222168, 0.0018380582332611084,
> 0.0009190291166305542],
>
>                         //                      tileSize: new
> OpenLayers.Size(500,500),
>
>                         units: 'm',
>
>                         projection: "EPSG:21781",
>
>                         controls: []
>
>                         };
>
>
>
> var map = new OpenLayers.Map('map',options1);
>
>
>
> var wms = new OpenLayers.Layer.WMS("Gemeinden",urlArrayTC,
> {map:mapFile,layers:layerName,format:"image/png",EXCEPTIONS:"application/vnd.ogc.se_inimage"}
> );
>
>
>
> var
> sld_string=url+"jahr="+jahr+"&indikator="+indikator1+"&klassen="+klassen+"&vis="+vis+"&fusion="+jahr4+"&farbe="+farbe;
>
>
>
> wms.mergeNewParams({ SLD:sld_string});
>
>
>
> I only get a white map without any polygons. Perhaps you can give me a
> little tip. I don’t know Why I have no map data.
>
>
>
> A lot of thanks
>
> Hanno Rahn
>
>
>
>
>
> ------------------------------------------
>
> Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik
>
> ZHAW Zürcher Hochschule für Angewandte Wissenschaften Umwelt und Natürliche
> Ressourcen
>
> Fachstelle Geoinformatik
>
> Grüental, Postfach CH-8820 Wädenswil
>
> Tel +41 (0)58 934 5592
>
> Fax +41 (0)58 934 5580
>
> hanno.rahn at zhaw.ch
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090930/516407f1/attachment.html


More information about the Users mailing list