Multiple labels along a line

Berend Veldkamp berend.veldkamp at ARIS.NL
Tue Aug 17 07:33:45 PDT 2004


Hi David,

The line segments are short enough, so one label per segment wil suffice.
When I set MINDISTANCE to 0, PARTIALS and FORCE to true, I still get
only one label per line. Here's the relevant part of my mapfile:
LAYER
   NAME nummers
   TYPE annotation
   DATA route
   CLASS
     LABEL
       TYPE truetype
       FONT arial
       SIZE 10
       MINSIZE 7
       MAXSIZE 14
       COLOR 255 0 0
       OUTLINECOLOR 255 255 204
       ANTIALIAS true
       ANGLE AUTO
       MINDISTANCE 1
       PARTIALS true
       FORCE true
     END
   END
   LABELITEM etappe
   SYMBOLSCALE 100000
END

Berend


David Fawcett wrote:

> I think the answer may be somewhat data dependent.  How long are your
> line segments?
>
> There are two possible cases.
> 1. You have multiple arcs in a line and currently only the longest one
> is being labeled.  If this is the case, try setting MINDISTANCE in the
> label object.  This sets the minimum distance in pixels between labels.
> I am not sure what the default is, so I don't know if a very small
> number will give you more labels.  You may also want to set PARTIALS and
> FORCE in case the labels aren't being drawn due to collisions or
> trailing off of image.
>
> 2.  You have a long segment and you want to place multiple labels on the
> same segment.  I don't believe that Mapserver is capable of doing that.
> Of course, I may be wrong.  If the data is pretty static and you really
> want this functionality, you could preprocess your data and chop it into
> smaller segments.
>
> David.
>
>
> David J. Fawcett
> MN Office of Environmental Assistance
>


--
____________________________

Berend Veldkamp - ARIS
http://www.aris.nl/
____________________________



More information about the MapServer-users mailing list