[mapserver-users] complex label

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Mon Feb 13 09:17:35 PST 2012


With existing versions you'd have to use multiple layers and offsets but it's possible that collision detection would mess with the 3 components and you'd be left with partials. 

That said we just committed an initial implementation of RFC 77 which allows for the definition of multiple labels within a class. Each can draw content from different fields in the data and is rendered with different settings so you can change font, size, color etc... They're considered 1 label for collision detection purposes so no partials...

Configuration looks like:

LABELITEM 'big_letter'
CLASS
  ... styles ...
  LABEL
    FONT 'arial-bold'
    SIZE 24
    POSITION CC
    ...
  END
  LABEL
    FONT 'arial'
    SIZE 8
    TEXT '[subscript_number]' # behaves just like class->text
    POSITION LR
    OFFSET ... # probably have to play with values here
    ...
  END
  LABEL
    FONT 'arial-bold'
    SIZE 8
    TEXT '([superscript_number])' # behaves just like class->text
    POSITION UR
    OFFSET ... # probably have to play with values here
    ...
  END
END

Labels can also have expressions defined so you can conditionally display label components.

Anyway, if you're brave you'd need to use trunk. Remember this is brand new and perhaps a bit buggy but any testing/feedback is appreciated.

Steve

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of mmypost mmypost
Sent: Monday, February 13, 2012 1:06 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] complex label

Hi
Sorry for my bad English.

Can I draw complex label as attachment file by mapserver?
I think I can draw the label if I  separate the label for 3 field and apply "offset" property, but may be  exists more standard path?

Yours sincerely,
Sev




More information about the MapServer-users mailing list