Labeling roads

Andre Schoonbee andresch at IWAY.NA
Tue Nov 6 14:20:28 EST 2007


Thanks Steve, but may I be blond...


In my layer definition, I have specified the line type as follows, - can I
simply add the Style for the shield.png at the end of my 2 styles, or at
what stage do I define the "Labeling symbol"?

 
NAME "Roads"
     STATUS ON
     TYPE ANNOTATION
     STATUS DEFAULT
#     TYPE LINE
     CONNECTIONTYPE postgis
     CONNECTION "user=postgres password=postgres dbname=posgis_ascii
host=localhost port=5432"
     DATA "the_geom from roads"

     CLASSITEM "type" # field used by EXPRESSION in class objects
    
    # Begin classes for Freeways
     CLASS
       EXPRESSION ('[type]' = 'Freeway')
       NAME "Freeways"
       MAXSCALE 1000000
       MINSCALE 500001
       STYLE # Draw the outline
         SYMBOL 'circle'
         COLOR 0 0 0
         SIZE 6
       END
       STYLE # Draw the center redline
         SYMBOL 'circle'
         COLOR 255 0 0
         SIZE 4
       END
     END


Regards

Andre
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Steve Lime
Sent: Tuesday, November 06, 2007 4:58 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Labeling roads

Hi Andre: You use annotation layers. I think the demo shows this off. A
layer
would look like:

LAYER
  NAME 'road_anno'
  TYPE ANNOTATION
  STATUS DEFAULT
  DATA 'roads'
  LABELITEM 'roadnum'
  CLASS
    STYLE
      SYMBOL 'shield.png'
    END
    LABEL
      COLOR 0 0 0
      SIZE TINY
    END
  END
END

Steve

>>> Andre Schoonbee <andresch at IWAY.NA> 11/05/07 8:32 AM >>>
How can I label a road by using the state symbol and putting the road no on
top of it?

Andre



More information about the mapserver-users mailing list