[mapserver-users] duplicate labels

Steve Lime Steve.Lime at dnr.state.mn.us
Thu Jul 23 09:16:16 PDT 2009


Would help if you could put together a test case for us to try. Without being familiar with your
data it's hard to know what is right or wrong in the images. The label parameter MINDISTANCE
is always given in pixels. In current versions it works of the centers of labels although that will
change in the next release so that label size is taken into account.

Anyway, MINDISTANCE is considered when two labels are from the same layer, same class and
have the same exact value. Would be interesting to see your data and mapfile...

Steve

>>> On 7/23/2009 at 10:57 AM, in message <4A688873.4060007 at squeakycode.net>, Andy
Colson <andy at squeakycode.net> wrote:
>>  Andy Colson wrote:
>>>> Lars Lingner wrote:
>>>>> One last thought: Do you have this problem just with the layer
>>>>> "annotate_pin"? Does the labeling of other layers work as you expect?
>>>>
>>>> Hum... good question.  I'll try it Monday when I get back to work.  
>>>> Thanks for the help on this.
>>>>
>>>> -Andy
>>>>
>>>
>>> Ok, took longer than I thought to get back to this, but I've tried it 
>>> with the roads layer and still cannot adjust the distance between labels.
>>>
>>> here is a screen shot:
>>>
>>> http://maps.camavision.com/map2.png 
>>>
>>> I've changed MINDISTANCE from 9 to 900000, and the image stays the 
>>> same... the labels don't move.
>>>
>>> If I set the layer.sizeunits to feet, then the font size scales with 
>>> the image as I zoom in and out... I assume the font size is being set 
>>> to 7 feet instead of 7 pixels?  (I have label.size = 7).  But still, 
>>> the mindistance seems to make no difference.
>>>
>>> Also, some of the labels are being messed up, in the screen shot you 
>>> can see it.  And the road didnt get draw right either.
>>>
>>> hum... it occurs to me... I dont know how many different lines were 
>>> used to draw 110th st.  If they used multiple lines, would I get a 
>>> label for each line?  Casper seemed to get one label.
>>>
>>> -Andy
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org 
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users 
> 
> Christy Nieman wrote:
>  > Hi,
>  >
>  > (I don't remember if this has been asked yet or not, but...) does your
>  > OpenLayers application use tiles?  Is it possible the duplicate labels
>  > are actually on separate tiles?  If so, you can try setting OpenLayers
>  > to single tile mode to see if this is indeed the problem.  Then you can
>  > try defining PROCESSING 'LABEL_NO_CLIP=1' for the layer.
>  >
>  > Christy
>  >
> 
> 
> Ok, that makes a difference.  Which makes sense if you think about it. 
> Thanks for the pointer.  However...
> 
> http://maps.camavision.com/map3.png 
> 
> some of the labels came out ok, and some didnt.  I removed all the 
> lables from all other classes and if I change the font color, they all 
> change, but they never get the backgroud.
> 
> This happens regardless of the LABEL_NO_CLIP=1 setting.
> 
> -Andy
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list