[mapserver-users] labels - road shields and road names

Tiemens, Gerben Gerben.Tiemens at grontmij.nl
Mon Nov 16 04:25:59 EST 2009


What is also possible is:




CLASS
      {YOUROWNCLASSSPECIFICATIONS}
        Text  ( [column1],"#" ,[column2])
        LABEL
          MAXLENGTH 0
          POSITION CC
          WRAP   '#'
          {Yourownlabelspecifications.          }
        END
        STYLE
                {YOURSTYLEOFSIGNHERE}
        END
     END

 to combine two columns and have a two line sign which is wrapped at the #.

Greets
Gerben





-----Oorspronkelijk bericht-----
Van: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] Namens Brent Fraser
Verzonden: Friday, November 13, 2009 7:09 PM
Aan: Mark Volz
CC: mapserver-users at lists.osgeo.org
Onderwerp: Re: [mapserver-users] labels - road shields and road names

Mark,

  Here's how I do it...

Brent

 LAYER
    NAME 'Hwy'
    TYPE ANNOTATION
:
:
    LABELITEM 'NUMBER_1'
    LABELCACHE ON

    CLASS
      STYLE  # Hiway number circle
        SYMBOL "circle"
        SIZE 23
        COLOR 254 254 254  # Off-white so not considered as transparent
        OUTLINECOLOR  0 0 0
      END # STYLE

      LABEL
        POSITION CC
        COLOR            0  0  0
        OUTLINECOLOR 254 254 254
        BUFFER 0
        PARTIALS TRUE
        MINDISTANCE 500
        OFFSET 1 0  # center in circle better
        TYPE TRUETYPE
        FONT 'Arial'
        SIZE 8
      END # LABEL
    END # Class
  END  # Layer


> Hello,
>
> What is the best way to label a road displaying both the road number
> in a shield and the road name along the line.  The following does not
> seem to work
>
>
>
> The following is an attachment for my roads file.
>
> Layer #road annotation
>       Data '.roads'
>       Type annotation
>       Classitem 'class'
>       CLASS #US HWY shields
>               TEXT ([ROAD_NUM])
>               EXPRESSION ('[CLASS]' eq 'A10' and '[ROAD_NUM]' ne '0')
>               COLOR 0 0 0 # dummy color
>               SYMBOL '../../symbols/USHWY.png'
>               LABEL
>                               type truetype  # AGG required
>                               size 7 #for AGG
>                       FONT vera_sans  #for AGG
>                               MINFEATURESIZE 25
>                               MINDISTANCE 200
>               END #LABEL
> END #CLASS
>       CLASS #US HWY
>               MAXSCALEDENOM 75000
>               TEXT ([FULLNAME])
>               EXPRESSION ('[CLASS]' eq 'A10' and '[ROAD_NUM]' ne '0')
>               SYMBOL '../../symbols/USHWY.png'
>               LABEL
>                       TYPE TRUETYPE
>                       FONT franklin-gothic-heavy
>                       SIZE 7
>                       ANTIALIAS TRUE
>                       OUTLINECOLOR 254 254 254
>                       BUFFER 0
>                       MINFEATURESIZE auto
>                       PARTIALS FALSE
>                       ANGLE AUTO
>               END #LABEL
>       END #CLASS
> ...
>
>
>
> Mark Volz
> GIS Specialist
> Lyon County, MN
> 507-532-8218
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>


_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

<< Please read our E-mail Disclaimer at: Emaildisclaimer.Grontmij.com >>


More information about the mapserver-users mailing list