Hi.<br><br><span style="color: rgb(0, 0, 0);">Your tilecache layer is defined as WMS, so i think you can remove </span><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><span style="color: rgb(0, 0, 0);">mapfile=...</span><br style="color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0);">Now the main:<br>try adding levels=..., maxresolution=..., resolutions=... in your tilecache.cfg<br>these settings must be the same as for openlayers map<br><br>regards, michael<br></span></span></font><br>
<div class="gmail_quote">2009/9/30 Rahn Hanno (rahn) <span dir="ltr"><<a href="mailto:rahn@zhaw.ch">rahn@zhaw.ch</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="DE-CH">
<div>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">I will realise the
Tilecache but it doesn’t work with my base layer. For all other layers it
works.</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">Hello list,</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">I have another question
and perhaps somebody can help me. I try to use Tilecache for a better
performance of my maps.</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">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. </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">For my base layer (only
polygons, “gemeinden_2008”) I write the follwing code in the
tilecache.cfg.</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">[gemeinden_2008]</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">type=WMS</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">url=<a href="http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map" target="_blank">http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map</a></span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">mapfile=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">layers=gemeinden_2008</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">extension=png</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">extent_type=loose</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">srs=EPSG:21781</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">bbox=555100,129900,678450,245000</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">metaTile=true</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">And in my OpenLayers File
I define the layer like this:</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">var layerName = (jahr <=2008) ?
'gemeinden_2008' : 'gemeinden_2009';</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">var urlArrayTC =
["<a href="http://webgis.hsw.ch/cgi-bin/tilecache/tilecache.cgi" target="_blank">http://webgis.hsw.ch/cgi-bin/tilecache/tilecache.cgi</a>?"];</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">var mapFile =
"../htdocs/GINES/Maps/Gemeinden_Bern.map";</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">var options1 = {</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">
maxExtent: new OpenLayers.Bounds(555100,129900,678450,245000),</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">
maxScale: '500',</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">
minScale: '458262',</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">
//
fractionalZoom: true,</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">
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],</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">
//
tileSize: new OpenLayers.Size(500,500),</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">
units: 'm',</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">
projection: "EPSG:21781",</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">
controls: []</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">
};</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">var map = new
OpenLayers.Map('map',options1);</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">var wms = new
OpenLayers.Layer.WMS("Gemeinden",urlArrayTC,
{map:mapFile,layers:layerName,format:"image/png",EXCEPTIONS:"application/vnd.ogc.se_inimage"}
);</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">var
sld_string=url+"jahr="+jahr+"&indikator="+indikator1+"&klassen="+klassen+"&vis="+vis+"&fusion="+jahr4+"&farbe="+farbe;</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">wms.mergeNewParams({
SLD:sld_string});</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">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.</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">A lot of thanks </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">Hanno Rahn</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">------------------------------------------</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">ZHAW Zürcher Hochschule für Angewandte
Wissenschaften Umwelt und Natürliche Ressourcen </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">Fachstelle Geoinformatik </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">Grüental, Postfach CH-8820 Wädenswil </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">Tel +41 (0)58 934 5592</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">Fax +41 (0)58 934 5580 </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"><a href="mailto:hanno.rahn@zhaw.ch" target="_blank">hanno.rahn@zhaw.ch</a> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;" lang="EN-GB"> </span></font></p>
</div>
</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br>