<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>Hi Mr. Michael,<br><br>Thanks for replying, i already did what you suggested to me and i delete my layer about LABELITEMS (my coding in the bottom), but there's no labels appear in my map yet, why?<br><br>then when i write like this: (coding) there was an error message : <span style="font-weight: bold;">getString(): Symbol definition error. Parsing error near ([name_region]|[value_1]-[value_2])<br><br></span>here the coding:<span style="font-weight: bold;"><br></span>LAYER <br> NAME "Annotation of Region"<br> TYPE ANNOTATION<br> STATUS DEFAULT<br> <span style="font-weight: bold;">FEATURE</span><br> TEXT ([name_region]|[value_1]-[value_2])<br>
END #FEATURE<br> CLASS<br> LABEL<br> COLOR 0 0 0<br> TYPE Truetype<br> FONT Arial<br> SIZE 11<br> MINSIZE 8<br> ANGLE Auto<br> POSITION UC<br> ANTIALIAS True<br> WRAP "|"<br> END #LABEL<br> END #CLASS<br>END #LAYER<br><span style="font-weight: bold;"><br><br></span>Thanks for the attention :)<br>-Theresia<span style="font-weight: bold;"><br></span></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div
style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1">r<b><span style="font-weight: bold;">From:</span></b> Michael Schulz <xx@xx.x><br><b><span style="font-weight: bold;">To:</span></b> elisabeth theresia <xx@xx.com><br><b><span style="font-weight: bold;">Cc:</span></b> mapserv forumlist <mapserver-users@lists.osgeo.org><br><b><span style="font-weight: bold;">Sent:</span></b> Wed, October 6, 2010 6:45:30 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [mapserver-users] How to display Labels from 1 table?<br></font><br>
Hi Theresia,<br><br>you can do it via the TEXT keyword in the CLASS section of a layer:<br><span><a target="_blank" href="http://www.mapserver.org/mapfile/class.html">http://www.mapserver.org/mapfile/class.html</a></span><br><br>e.g. like this:<br><br> CLASS<br> LABEL<br> COLOR 0 0 0<br> TYPE Truetype<br> FONT Arial<br> SIZE 11<br> MINSIZE 8<br> ANGLE Auto<br> POSITION UC<br> ANTIALIAS True<br> WRAP "|"<br> END # LABEL<br> TEXT
([name_region]|[values_1] - [values_2])<br> END #CLASS<br><br>This will label the features with the values of the tree fields in this form:<br><br>name_region<br>values_1 - values_2<br><br>You can request the line break with the WRAP keyword. In recent<br>mapbender versions there are also keywords to control label alignment.<br><br>Cheers, Michael<br><br><br>2010/10/6 elisabeth theresia <<a ymailto="mailto:dbee_kawai@yahoo.com" href="mailto:dbee_kawai@yahoo.com">dbee_kawai@yahoo.com</a>>:<br>> Hello Mapserver experts,<br>><br>> I have question in my mind, How to display Labels from 1 table in my<br>> database (Postgre + Postgis)?<br>> in this table there are fields of : name_region, values_1, values_2, How to<br>> appear them? Could Mapserver make it?<br>> I ask this question, because I want to show the difference values_1 between<br>> values_2 in my Bar Chart :)<br>><br>> if i do this (code in the
bottom) then just appear values_2 in the map :) ?<br>><br>> LAYER<br>> STATUS DEFAULT<br>> TYPE ANNOTATION<br>> CONNECTIONTYPE POSTGIS<br>> CONNECTION "user=x password=x dbname=mydb host=host port=5432"<br>> DATA "the_geom FROM tb_region USING UNIQUE code_region"<br>><br>> LABELITEM "name_region"<br>> CLASS<br>> LABEL<br>> COLOR 0 0 0<br>> TYPE Truetype<br>> FONT Arial<br>> SIZE 11<br>> MINSIZE 8<br>> ANGLE Auto<br>> POSITION UC<br>>
ANTIALIAS True<br>> END # LABEL<br>> END #CLASS<br>><br>> LABELITEM "values_1"<br>> CLASS<br>> LABEL<br>> COLOR 255 255 255<br>> TYPE Truetype<br>> FONT Arial<br>> SIZE 9<br>> MINSIZE 8<br>> ANGLE Auto<br>> POSITION UC<br>> ANTIALIAS True<br>> END # LABEL<br>> END #CLASS<br>><br>> LABELITEM "values_2"<br>> CLASS<br>>
LABEL<br>> COLOR 255 255 255<br>> TYPE Truetype<br>> FONT Arial<br>> SIZE 9<br>> MINSIZE 8<br>> ANGLE Auto<br>> POSITION UC<br>> ANTIALIAS True<br>> END # LABEL<br>> END #CLASS<br>> END #LAYER<br>><br>> Thanks really appreciate yours,<br>><br>> -Theresia :)<br>><br>><br>> _______________________________________________<br>> mapserver-users mailing list<br>> <a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><span>> <a target="_blank"
href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></span><br>><br>><br><br><br><br>-- <br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Treffen Sie uns auf der INTERGEO<br>05.10. - 07.10.2010<br>in Köln Halle: 11.2<br>Stand-Nr: 2C.121<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br><br>-----------------------------------------------------------<br>Michael Schulz<br><a ymailto="mailto:mschulz@webgis.de" href="mailto:mschulz@webgis.de">mschulz@webgis.de</a><br><br>in medias res<br>Gesellschaft für Informationstechnologie mbH<br><br>Schwimmbadstraße 2<br>D-79100 Freiburg i. Br.<br><br>Tel: +49 (0)761 705798-102<br>Tel: +49 (0)761 705798-0<br>Fax: +49 (0)761 705798-09<br><br><span><a target="_blank" href="http://www.webgis.de">http://www.webgis.de</a> / <a target="_blank"
href="http://www.zopecms.de">http://www.zopecms.de</a></span><br>--------------------------------------------------------------<br>Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck<br>Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg<br></div></div>
</div><br>
</body></html>