Question about OFFSET values

Blammo bob.basques at CI.STPAUL.MN.US
Sat Dec 10 10:49:34 PST 2005


>
>
> I guess I need to try this. So I assume that the offsets work relative 
> to the rotated label and not the image X-Y axis. Cool, I just noticed 
> that you have MULTIPLE labels for a single layer. I didn't know you 
> could do that. ... I love mapserver!!!

Actually they are all seperate layers right now.  Sorry about the confusion.

bobb

>
> Thanks,
>   -Steve
>
>> LABEL
>>  ANGLE AUTO
>>  POSITION LL
>>  TEXT "[L_FROM]"
>>    OFFSET 10 5  ## it's interesting that these numbers don't need to 
>> be negative like I thought at first.
>>  ...
>> END
>> LABEL
>>  ANGLE AUTO
>>  POSITION UL
>>  TEXT "[L_TO]"
>>    OFFSET 10 5
>>  ...
>> END
>> LABEL
>>  ANGLE AUTO
>>  POSITION LR
>>  TEXT "[R_FROM]"
>>    OFFSET 10 5
>>  ...
>> END
>> LABEL
>>  ANGLE AUTO
>>  POSITION UR
>>  TEXT "[R_TO]"
>>    OFFSET 10 5
>>  ...
>> END
>>
>> bobb
>>
>> Stephen Woodbridge wrote:
>>
>>> 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