[mapserver-users] Different SIZEUNITS for line width and label fontsize

Venkat Rao Tammineni vtammineni at roulacglobal.com
Tue Feb 3 06:27:00 EST 2009


Hi,


  Please refer below url

http://mapserver.org/mapfile/symbology/construction.html


I hope this helps you.


Thanks
Venkat.

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Vladimir
Cvejanovic
Sent: Tuesday, February 03, 2009 4:47 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Different SIZEUNITS for line width and label
fontsize

Hi All,

In the Mapfile, Is it possible to have different SIZEUNTIS for line 
width and label font in the same layer? The example is below.

I have managed to solve this by defining two layers one which only 
displays the line and one which only displays the labels however this 
seems like a hack and very inefficient from a processing / querying 
point of view.

The context is a line layer containing road lines which have a width in 
meters but labels in pixels. This would make things scale nicely Can 
this be done? Does anyone have a better approach?

Thanks,
Vladimir

LAYER
    NAME 'highway'
    TYPE LINE
    DATA 'highway.shp'

    STATUS DEFAULT
    TRANSPARENCY 30

    LABELITEM "NAME"
    SIZEUNITS meters

    CLASS
       NAME 'highway'
       STYLE
         WIDTH 5 #WANT THESE TO BE METERS
         COLOR 55 55 55
       END
       LABEL
        TYPE TRUETYPE
        FONT FreeSans
        SIZE 08 # WANT THESE TO BE PIXELS
        COLOR 0 0 0
        OUTLINECOLOR 255 255 255
        ANTIALIAS TRUE
        ANGLE AUTO
        MINFEATURESIZE AUTO
        FORCE true
      END
    END
  END
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list