Dynamic values in the layer (from database) for label definition

Eduard Witteveen e.witteveen at HAWARIT.COM
Thu Jan 19 11:01:19 EST 2006


Hello list,

While making a layer, i wanted to create dynamic labels in my 
pointlayer. For this i used the following layer definition:
> 	LAYER
> 		NAME annotation_text_
> 		TYPE ANNOTATION
> 		STATUS DEFAULT
> 
> 		CONNECTION "user=postgres password=xxxx dbname=postgres host=localhost port=5432"
> 		CONNECTIONTYPE postgis	
> 		DATA "the_geom from annotation_text"						
> 
> 		#database fields to use
> 		LABELITEM		"message"
> 		LABELANGLEITEM		"angle"
> 		LABELSIZEITEM		"size"
> 		#LABELCOLORITEM		"color"
 > 		#LABELFONTITEM		"font"
> 		
> 		CLASS
> 			# Style required before label?
> 			STYLE
> 	  		END
> 			LABEL
> 				TYPE TRUETYPE
>         		FONT "vera"
>         		SIZE 12
>         		ANTIALIAS TRUE
>         		COLOR 120 20 20
> 				#POSITION lc
> 				POSITION uc
> 				PARTIALS ON
> 	      	END
> 	   END
> 	END

As you can notice, i want to change the color and the font also from 
data stored in my database. How can i accomplish this?

During my search for a sollution i also found some information about WMS 
SLD (Styled Layer Descriptor) interface of Mapserver, but i dont know if 
this can help me to accomplish my task?

-- 
Ing. Eduard Yeb Witteveen           Software Engineer
Hawar Information Technology bv   lid Dijkoraad Groep
De Wymerts 7  8701 WT                        Bolsward
Tel: +31 (0)515 570333         Fax: +31 (0)515 570335
http://www.hawarit.com/             nl_NL fy_NL en_US



More information about the mapserver-users mailing list