Line Labels (multiple Labels) {Scanned}
Siki Zoltan
siki at AGT.BME.HU
Tue Nov 22 06:38:26 PST 2005
Hi,
You can add the same shape file to your map file, and you can specify
different label location (e.g. LL, LR, UL, UR).
LAYER
NAME "l1"
DATA "<your_data>
LABELITEM "from_left"
TYPE ANNOTATION
CLASS
LABEL
...
POSITION UL
ANGLE AUTO
END
END
END
LAYER
NAME "l2"
DATA "<your_data>
LABELITEM "from_right"
TYPE ANNOTATION
CLASS
LABEL
...
POSITION LL
ANGLE AUTO
END
END
END
...
Bye,
Zoltan
On Mon, 21 Nov 2005, Blammo wrote:
> All,
>
> OK, I thought about this some more . . . .
>
> Just as a cheat to get something going, what about just stringing two of
> the labels together, top and bottom of the line, and seperate them by
> some spaces in the text. This would essentailly give me what I'm
> looking for, but it also has one problem, I need to be able to figure
> out the line direction. The address ranges are from-to related to the
> beginning/end of the lines. Is there a way to tell which direction a
> line is drawn? I believe the AUTO align does something like this
> doesn't it?
>
> The output would look something like:
>
> LeftMin LeftMax
> ----------------------------->
> RightMin RightMax
>
>
> RightMax RightMin
> <-----------------------------
> LeftMax LeftMin
>
> bobb
>
>
> Stephen Woodbridge wrote:
>
> > I have asked about this feature in the past. It would be a very nice
> > feature to have, but it is not available in mapserver yet unless you
> > want to code it up maporama does it and it looks very nice.
> >
> > http://www.maporama.com/share/
> >
> > I think it would be great if mapserver supported a more abstract label
> > positioning grammar like:
> >
> > LABEL
> > LABELITEM <field>
> > ...
> > LOCATION
> > POSITION ...
> > PERCENT_ALONG <float>
> > SIDE [LEFT|RIGHT|CENTER|INSIDE|OUTSIDE]
> > OFFSET [X|Y|NORMAL] <float>
> > END
> > END
> >
> > Then you could attach multiple label blocks to a layer to generate the
> > labels you want. Moving LABELITEM into the LABEL block allows each
> > block too have its on item field.
> >
> > This could also be used to display labels along polygon boundaries
> > using INSIDE|OUTSIDE for things like administrative boundaries.
> >
> > -Steve
> >
> > Bob Basques wrote:
> >
> >> All,
> >>
> >> I think I saw something like this being asked a few months back, but
> >> haven't found it in a search.
> >>
> >> I need to be able to label a line at both ends and on both sides.
> >> Are there some techniques to use in MapServer for this? I can
> >> generate the point locations from other software for the labels, but
> >> the dataset changes quite frequently and I woulds like to pursue an
> >> automated method if possible.
> >>
> >> What I'm trying to label is a Street Centerline with the address
> >> ranges on both ends, we also have a right/left distinction at both
> >> ends so that I would need a label on each side of the line as well.
> >> Needless to say the labels would need to align with the line segment
> >> as well rotationally
> >>
> >> Even a search keyword would help if someone knows of something in the
> >> archives.
> >>
> >> Thanks for any info.
> >>
> >> bobb
> >>
> >
> >
>
More information about the MapServer-users
mailing list