<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:2.0cm 2.0cm 2.0cm 2.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=DE-CH link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span class=apple-style-span><font size=2 color=black
face=Verdana><span lang=EN-GB style='font-size:10.0pt;font-family:Verdana;
color:black'>hello list,</span></font></span><span class=apple-converted-space><font
size=2 color=black face=Verdana><span lang=EN-GB style='font-size:10.0pt;
font-family:Verdana;color:black'> </span></font></span><font size=2
color=black face=Verdana><span lang=EN-GB style='font-size:10.0pt;font-family:
Verdana;color:black'><br>
<br>
<span class=apple-style-span>I'm new in using TileCache with OpenLayers. Perhaps
you can help me.</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>I try to make Tiles for different Layers. First I
have some Polygons with region-borders. After this I have some background data
like streets for example.</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>In my OpenLayers file I use the follwing code:</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>var url = "</span></span></font><span
class=apple-style-span><font size=2 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'><a
href="http://webgis.hsw.ch/GINES/Styling/mysld_bezirke.php" target="_top"><font
size=3><span lang=EN-GB style='font-size:12.0pt'>http://webgis.hsw.ch/GINES/Styling/mysld_bezirke.php</span></font></a></span></font></span><span
class=apple-style-span><font size=2 color=black face=Verdana><span lang=EN-GB
style='font-size:10.0pt;font-family:Verdana;color:black'>?";</span></font></span><span
class=apple-converted-space><font size=2 color=black face=Verdana><span
lang=EN-GB style='font-size:10.0pt;font-family:Verdana;color:black'> </span></font></span><font
size=2 color=black face=Verdana><span lang=EN-GB style='font-size:10.0pt;
font-family:Verdana;color:black'><br>
<br>
<span class=apple-style-span>var urlFusion = "</span></span></font><span
class=apple-style-span><font size=2 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'><a
href="http://webgis.hsw.ch/GINES/Styling/mysld_fusion.php" target="_top"><font
size=3><span lang=EN-GB style='font-size:12.0pt'>http://webgis.hsw.ch/GINES/Styling/mysld_fusion.php</span></font></a></span></font></span><span
class=apple-style-span><font size=2 color=black face=Verdana><span lang=EN-GB
style='font-size:10.0pt;font-family:Verdana;color:black'>?";</span></font></span><span
class=apple-converted-space><font size=2 color=black face=Verdana><span
lang=EN-GB style='font-size:10.0pt;font-family:Verdana;color:black'> </span></font></span><font
size=2 color=black face=Verdana><span lang=EN-GB style='font-size:10.0pt;
font-family:Verdana;color:black'><br>
<br>
<span class=apple-style-span>var urlArray = ["</span></span></font><span
class=apple-style-span><font size=2 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'><a
href="http://webgis.hsw.ch/cgi-bin/mapserv.exe" target="_top"><font size=3><span
lang=EN-GB style='font-size:12.0pt'>http://webgis.hsw.ch/cgi-bin/mapserv.exe</span></font></a></span></font></span><span
class=apple-style-span><font size=2 color=black face=Verdana><span lang=EN-GB
style='font-size:10.0pt;font-family:Verdana;color:black'>?", "</span></font></span><span
class=apple-style-span><font size=2 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'><a
href="http://195.176.253.211/cgi-bin/mapserv.exe" target="_top"><font size=3><span
lang=EN-GB style='font-size:12.0pt'>http://195.176.253.211/cgi-bin/mapserv.exe</span></font></a></span></font></span><span
class=apple-style-span><font size=2 color=black face=Verdana><span lang=EN-GB
style='font-size:10.0pt;font-family:Verdana;color:black'>?"];</span></font></span><span
class=apple-converted-space><font size=2 color=black face=Verdana><span
lang=EN-GB style='font-size:10.0pt;font-family:Verdana;color:black'> </span></font></span><font
size=2 color=black face=Verdana><span lang=EN-GB style='font-size:10.0pt;
font-family:Verdana;color:black'><br>
<br>
<span class=apple-style-span>var urlArrayTC = ["</span></span></font><span
class=apple-style-span><font size=2 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'><a
href="http://webgis.hsw.ch/cgi-bin/tilecache/tilecache.cgi" target="_top"><font
size=3><span lang=EN-GB style='font-size:12.0pt'>http://webgis.hsw.ch/cgi-bin/tilecache/tilecache.cgi</span></font></a></span></font></span><span
class=apple-style-span><font size=2 color=black face=Verdana><span lang=EN-GB
style='font-size:10.0pt;font-family:Verdana;color:black'>?"];</span></font></span><span
class=apple-converted-space><font size=2 color=black face=Verdana><span
lang=EN-GB style='font-size:10.0pt;font-family:Verdana;color:black'> </span></font></span><font
size=2 color=black face=Verdana><span lang=EN-GB style='font-size:10.0pt;
font-family:Verdana;color:black'><br>
<br>
<span class=apple-style-span>var mapFile =
"../htdocs/GINES/Maps/Gemeinden_Bern.map";</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span> </span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>var options1 = {</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span> maxExtent:
new OpenLayers.Bounds(555100,129900,678450,245000),</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>
maxScale: '500',</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>
minScale: '458262',</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>
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><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>
maxresolution:481.8359375,</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>
minresolution:0.0009190291166305542,</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span> units:
'm',</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>
projection: "EPSG:21781",</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>
controls: []</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>};</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span> </span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>var map = new OpenLayers.Map('map',options1);</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span> </span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>var wms = new
OpenLayers.Layer.WMS("Gemeinden",urlArrayTC,
{map:mapFile,layers:layerName,format:"image/png",EXCEPTIONS:"application/vnd.ogc.se_inimage"}
);</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span> </span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>var
sld_string=url+"jahr="+jahr+"&indikator="+indikator1+"&klassen="+klassen+"&vis="+vis+"&fusion="+jahr4+"&farbe="+farbe;</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span> </span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>wms.mergeNewParams({ SLD:sld_string});</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span> </span><span class=apple-converted-space> </span><br>
<span class=apple-style-span>You can see that i'm using an skript which
generates an sld file. This file works with the mergeNewParams Parameter.</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>I get the data out of a postgreSQL database.</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>In my tilecache.cfg file I have this code:</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>[gemeinden_2008]</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>type=WMS</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>url=</span></span></font><span
class=apple-style-span><font size=2 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'><a
href="http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map"
target="_top"><font size=3><span lang=EN-GB style='font-size:12.0pt'>http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map</span></font></a></span></font></span><font
size=2 color=black face=Verdana><span lang=EN-GB style='font-size:10.0pt;
font-family:Verdana;color:black'><br>
<br>
<span class=apple-style-span>#mapfile=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>layers=gemeinden_2008</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>maxresolution=481.8359375</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>minresolution=0.0009190291166305542</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>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><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>levels=5</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>extension=png</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>extent_type=loose</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>srs=EPSG:21781</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>bbox=555100,129900,678450,245000</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>metaTile=true</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>----------------------------------------------</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>[seen]</span><span class=apple-converted-space> </span><br>
<span class=apple-style-span>type=WMS</span><span class=apple-converted-space> </span><br>
<span class=apple-style-span>url=</span></span></font><span
class=apple-style-span><font size=2 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'><a
href="http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map"
target="_top"><font size=3><span lang=EN-GB style='font-size:12.0pt'>http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map</span></font></a></span></font></span><font
size=2 color=black face=Verdana><span lang=EN-GB style='font-size:10.0pt;
font-family:Verdana;color:black'><br>
<span class=apple-style-span>#mapfile=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map</span><span
class=apple-converted-space> </span><br>
<span class=apple-style-span>layers=seen</span><span
class=apple-converted-space> </span><br>
<span class=apple-style-span>extension=png</span><span
class=apple-converted-space> </span><br>
<span class=apple-style-span>transparency=true</span><span
class=apple-converted-space> </span><br>
<span class=apple-style-span>extent_type=loose</span><span
class=apple-converted-space> </span><br>
<span class=apple-style-span>srs=EPSG:21781</span><span
class=apple-converted-space> </span><br>
<span class=apple-style-span>bbox=555100,129900,678450,245000</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>--------------------------------------------</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>And now I have a problem.</span><span
class=apple-converted-space> </span><br>
<span class=apple-style-span>For the Layer "seen" all works fine I
get the Tiles and all is ok. In my TielCache Directory I have the different png
files.</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>But with the Layer "gemeinden_2008" it
doesn't work. I only get white images. On the Server in the TielCache Directory
I have different white images without the map-data.</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>I don't know where what I have to do to correct
the error. Perhaps somebody can help me.</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>I use OpenLayers 2.8 with UMN Mapserver and
PostgreSQL database.</span><span class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>Thank you very much for your help.</span><span
class=apple-converted-space> </span><br>
<br>
<span class=apple-style-span>Greetings</span><span class=apple-converted-space> </span><br>
<span class=apple-style-span>Hanno Rahn</span></span></span></font><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'>------------------------------------------<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>ZHAW Zürcher Hochschule für Angewandte
Wissenschaften Umwelt und Natürliche Ressourcen <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Fachstelle Geoinformatik <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Grüental, Postfach CH-8820 Wädenswil <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'>Tel +41 (0)58 934 5592<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'>Fax +41 (0)58 934 5580 <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'>hanno.rahn@zhaw.ch <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>