ROAD, STREET, BUILDING NAMES DOES'NT APPEAR.

Delfos, Jacob jacob.delfos at MAUNSELL.COM
Mon Nov 7 23:47:24 EST 2005


 
Your label definition must sit inside the class. So:

LAYER
...
   CLASS
   .....

      LABEL
      ...
      END #end label

   END #end class

END #end layer       

________________________________

	From: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jack Ling
	Sent: 8 November 2005 12:43
	To: MAPSERVER-USERS at LISTS.UMN.EDU
	Subject: Re: [UMN_MAPSERVER-USERS] ROAD, STREET, BUILDING NAMES
DOES'NT APPEAR.
	
	
	Hi All,
	
	Thanks for your information. Based on your comments, I've added
label section, the fonts and font list for FONTSET.
	
	I don't know what should I put for LABELITEM. I put "Text", as
seen in the dump out of OGRFeatures. (sorry, I am really novice in the
terms to use). I've tried amending the various parameters but still
don't see the labels coming out.
	
	Would you please pinpoint me what else I should change in the
map file? Thanks.
	
	My MapFile below:
	
	MAP
	    NAME USA1
	    STATUS ON
	    SIZE 800 500
	    IMAGETYPE PNG
	    IMAGECOLOR 0 0 0
	    SHAPEPATH "../../data/usa"
	    EXTENT 835249.751000 815599.751000 836000.249000
816200.249000
	    UNITS METERS
	    FONTSET        "../../etc/fonts.txt"
	
	    WEB
	          IMAGEPATH "/ms4w/tmp/ms_tmp/"
	          IMAGEURL "/ms_tmp/"
	    END
	    
	    LAYER
	    NAME dgn
	    TYPE LINE
	    STATUS DEFAULT
	    CONNECTIONTYPE OGR
	    CONNECTION "11sw9d.dgn,0"
	    STYLEITEM "AUTO"
	    
	    LABELITEM    "Text"
	    CLASS
	        NAME "USA"
	            OUTLINECOLOR 60 60 60
	           SYMBOL 0
	            STYLE
	        COLOR      232 232 232
	      END
	      LABEL
	        COLOR 132 31 31
	        SHADOWCOLOR 218 218 218
	        SHADOWSIZE 2 2
	        TYPE TRUETYPE
	        FONT sans-bold
	        SIZE 12
	        ANTIALIAS TRUE
	        POSITION CL
	        PARTIALS FALSE
	        MINDISTANCE 300
	        BUFFER 4
	      END # end of label
	    END
	
	  END # Layer
	
	 
	    
	END
	
	
	On 11/7/05, Frank Warmerdam <warmerdam at pobox.com> wrote: 

		On 11/7/05, Jack Ling <fly2moon2 at gmail.com> wrote:
		>  For the text labels, they are represented using the
LABEL function like
		> below and these are the ones NOT SHOWN: 
		>
		>  OGRFeature(elements):535
		>    Type (Integer) = 17
		>    Level (Integer) = 11
		>    GraphicGroup (Integer) = 0
		>    ColorIndex (Integer) = 0
		>    Weight (Integer) = 0
		>    Style (Integer) = 0 
		>    EntityNum (Integer) = (null)
		>    MSLink (Integer) = (null)
		>    Text (String) = Convention and Exhibition Centre
		>    Style = LABEL(t:"Convention and Exhibition
Centre",c:#ffffff,s: 1.800g)
		>    POINT (835848.10800000001 816023.95000000007 0)
		>
		>  It is a steep learning curve for me to understand
MapServer and the
		> elements behind. Hope someone can point out what
should I do to make the 
		> ROAD, BUILDING NAME labels appear correctly.
		
		Jack,
		
		I *think* the most common reason autostyling text from
OGR fails in
		mapserver is forgetting to map the "default" font in
your fontlist.txt file.
		This is the font name used when the LABEL tool does not
include
		an explicit font name, as in this case.
		
		Hopefully this will help.
		
		Best regards,
		--
	
---------------------------------------+--------------------------------
------ 
		I set the clouds in motion - turn up   | Frank
Warmerdam, warmerdam at pobox.com
		light and sound - activate the windows |
http://pobox.com/~warmerdam 
		and watch the world go round - Rush    | Geospatial
Programmer for Rent
		



More information about the mapserver-users mailing list