[mapserver-users] How to display multiple labels in single layer in Mapfile
Michael Schulz
mschulz at webgis.de
Thu Feb 5 03:19:08 PST 2009
Hi Venkat,
yes, that's exactly what the TEXT parameter can do. The labelitem is
ignored if the TEXT parameter is found in a class definition.
To define a label from multiple attributes you write in the class definition
TEXT ([myAttribute1], [myAttribute2])
a small example:
CLASS
EXPRESSION "2004"
NAME "2004"
TEXT ([TK50]:![BEFLIEG1],[BEFLIEG2])
LABEL
WRAP "!"
TYPE truetype
FONT 'verdana'
ANTIALIAS true
SIZE 8
COLOR 100 100 100
OUTLINECOLOR 250 250 250
END
END
This definition labels a polygon with the name of a topograpic map and
two dates in the following way:
"6548:
2001,2006"
The WRAP parameter additionally defines a character at which a label
should insert a linebreak, in this case a "!" and you'll find the ! in
the TEXT parameter definition.
HTH, Michael
2009/2/5 Venkat Rao Tammineni <vtammineni at roulacglobal.com>:
> Dear Michael,
>
>
> Thanks for your great response. I am not clear with you answer. But what I
> need is I need to display two labels in single shape in a single layer.I
> mean do we have any option set labelitem as multiple colums.now the
> labelitem is taking single column.
>
> Please guide me.
>
> Thanks and Regards
> Venkat.
>
> -----Original Message-----
> From: mandschulz at googlemail.com [mailto:mandschulz at googlemail.com] On Behalf
> Of Michael Schulz
> Sent: Thursday, February 05, 2009 3:55 PM
> To: Venkat Rao Tammineni
> Cc: mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] How to display multiple labels in single
> layer in Mapfile
>
> Hi Venkat,
>
> you can use
>
> TEXT ([FIRSTNAME],[LASTNAME]) in the CLASS context.
>
> See here: http://mapserver.org/mapfile/class.html
>
> Cheers, Michael
>
>
> 2009/2/5 Venkat Rao Tammineni <vtammineni at roulacglobal.com>:
>> Dear All,
>>
>>
>>
>> Is it possible to display two labels that is (Country name and
>> Population) and the country name and population is in separate columns .
>>
>>
>>
>> I am waiting for your great response.
>>
>>
>>
>>
>>
>> Advanced Thanks,
>>
>>
>>
>> Regards
>>
>> Venkat.
>>
>>
>>
>>
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>
>
>
> --
> -----------------------------------------------------------
> Michael Schulz
> mschulz at webgis.de
>
> in medias res
> Gesellschaft für Informationstechnologie mbH
>
> In den Weihermatten 66
> 79108 Freiburg
>
> Tel +49 (0)761 556959-5
> Fax +49 (0)761 556959-6
>
> http://www.webgis.de / http://www.zopecms.de
> -----------------------------------------------------------
> Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck
> Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg
>
>
--
-----------------------------------------------------------
Michael Schulz
mschulz at webgis.de
in medias res
Gesellschaft für Informationstechnologie mbH
In den Weihermatten 66
79108 Freiburg
Tel +49 (0)761 556959-5
Fax +49 (0)761 556959-6
http://www.webgis.de / http://www.zopecms.de
-----------------------------------------------------------
Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck
Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg
More information about the MapServer-users
mailing list