<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6487.1">
<TITLE>SLD TextSymbolizer Question</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">I’ve been working on a way to incorporate a dynamically generated SLD, which I am using to provide custom filter capabilities on a point layer. I’ve managed to get a simple widget</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> (using Chameleon)</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> developed which passes a form variable to the SLD script file, permitting a dynamic filter value to be passed. It works great, but now I’m having trouble getting the TextSymbolizer in the SLD to correctly format the labels.</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">The TextSymbolizer will change the color of the labels, but not the font or the point size – the font is installed with Mapserver in the correct directory. The map file layer, and appropriate SLD script is below.</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Thanks for any suggestions – I’m sure I’m missing something simple……</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Here is the extract of the TextSymbolizer script:</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <TextSymbolizer>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <Geometry>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <PropertyName>site</PropertyName>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " </Geometry>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <Label>site</Label>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <Font>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <CssParameter name='font-family'>vera</CssParameter>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <CssParameter name='font-style'>normal</CssParameter>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <CssParameter name='font-weight'>normal</CssParameter>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <CssParameter name='font-size'>8</CssParameter>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " </Font>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <Fill>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <CssParameter name='fill'>#000000</CssParameter>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " </Fill>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <LabelPlacement>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <PointPlacement>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <AnchorPoint>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <AnchorPointX>0.5</AnchorPointX>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <AnchorPointY>0.5</AnchorPointY>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " </AnchorPoint>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <Displacement>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <DisplacementX>20</DisplacementX>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <DisplacementY>10</DisplacementY>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " </Displacement>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <Rotation>20</Rotation>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " </PointPlacement>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " </LabelPlacement>";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " <Halo />";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">$strScriptOut = $strScriptOut . " </TextSymbolizer>";</FONT></SPAN></P>
<BR>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Here is the Mapfile layer:</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> LAYER</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> NAME "CABINPoints"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> GROUP "Sample Points"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> STATUS ON</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> TYPE RASTER</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> TOLERANCE 5</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> TOLERANCEUNITS PIXELS</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> TEMPLATE "tt.html"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> CONNECTIONTYPE WMS</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> CONNECTION "</FONT></SPAN><SPAN LANG="en-us"></SPAN><A HREF="http://localhost/scripts/mapserv.exe?map=C:/Documents%20and%20Settings/TimP/My%20Documents/CABIN/Maps/map/pointswms.map"><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">http://localhost/scripts/mapserv.exe?map=C:/Documents%20and%20Settings/TimP/My%20Documents/CABIN/Maps/map/pointswms.map</FONT></U></SPAN><SPAN LANG="en-us"></SPAN></A><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> METADATA</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New"> "wms_onlineresource" "</FONT></SPAN><SPAN LANG="en-us"></SPAN><A HREF="http://localhost/scripts/mapserv.exe?"><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">http://localhost/scripts/mapserv.exe?</FONT></U></SPAN><SPAN LANG="en-us"></SPAN></A><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New"> "wms_sld_url" ""</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> "wms_title" "CABIN Points test layer"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> "wms_abstract" "Test Access to CABIN SQL-Server Database on ECBURAS1"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> "wms_srs" "EPSG:42304"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> "wms_name" "CABINPoints" # Eventually change this to the name of the Project being mapped??</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> "wms_formatlist" "image/png,image/gif,image/jpeg,image/wbmp"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> "wms_format" "image/png"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> "selected" "0"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> "wms_server_version" "1.1.1"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> "wms_title" "Site Location"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> END</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> LABELITEM "site"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> CLASS</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">name 'CABINPoints'</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">LABEL</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New"> COLOR 0 0 0</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> TYPE TRUETYPE</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> FONT fritqat</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> SIZE 8</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> POSITION LR</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">END</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> END</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> PROJECTION</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> "init=epsg:4326"</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> END</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> DUMP TRUE</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> END</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"></SPAN><A NAME=""><SPAN LANG="en-us"></SPAN></A></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#000080" FACE="Comic Sans MS">Timothy Pascoe<BR>
</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><BR>
</SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT COLOR="#800080" SIZE=2 FACE="Verdana">Environment Canada / Environnement Canada<BR>
Canada Centre for Inland Waters / Centre Canadien des Eaux Intérieures<BR>
867 Lakeshore Road / 867, chemin Lakeshore<BR>
Burlington, Ontario / Burlington (Ontario)</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#800080" SIZE=2 FACE="Verdana">L7R 4A6<BR>
<BR>
</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT COLOR="#008000" SIZE=2 FACE="Trebuchet MS">Tel/Tél: (905) 336-6239<BR>
Fax/</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT COLOR="#008000" SIZE=2 FACE="Trebuchet MS">Téléc</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT COLOR="#008000" SIZE=2 FACE="Trebuchet MS">: (905) 336-4699<BR>
E-mail/C. élec:</FONT></SPAN><SPAN LANG="en-us"> </SPAN><A HREF="mailto:tim.pascoe@ec.gc.ca"><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><U></U></SPAN><U><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Trebuchet MS">tim.pascoe@ec.gc.ca</FONT></SPAN></U><SPAN LANG="en-us"></SPAN></A><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><BR>
</SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT COLOR="#000080" SIZE=2 FACE="Tahoma">Government of Canada/Gouvernement du Canada</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"></SPAN></P>
</BODY>
</HTML>