Question about OFFSET values

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Fri Dec 9 20:56:57 PST 2005


Hi Bob,

Would you post what you have done so far? I have wanted to do something 
like this for a long while.

Have you, would you open a bug for an enhancement to mapserver to better 
support this functionality?

You might be able to get this to work with two layers by:

LABEL
   ANGLE AUTO
   POSITION CC
   TEXT "[L_FROM] [R_FROM]"
   WRAP " "
   ...
END

Then you can vary the number of spaces between the two fields based on 
the line thickness and then use the OFFSETs to get them positioned on 
the line.

It would be nice if POSITION could take a percentage along the line 
segment as the label point. So 0.0 would be the start of the line and 
1.0 would be the end of the line and the angle would be based on which 
part of the polyline that the label point fell on.

-Steve W.

Bob Basques wrote:
> All,
> 
> Ok, I got my addressing range labels too llok pretty good using four 
> Layers with seperate LABELITEMS and OFFSETS.
> 
> Now I need to figure out a way, if possible, to scale the OFFSET values 
> based on the overall length of the line.
> 
> Can I use a value, line length, and a percentage of line length to use 
> for the Offset values of the labels.  Right now the labels are situated 
> for the most part near the center of the line.  I would like to puch the 
> labels out to the ends of the lines for example, or pull them in closer 
> for longer and shorter line segments.
> 
> This is purely an exercise in readability right now, what I have seems 
> to be working great for the customer.  Thanks for the pointers I got 
> last week.
> 
> bobb
> 



More information about the MapServer-users mailing list