[mapserver-users] duplicate labels

Lars Lingner ml at lingner.eu
Fri Jul 17 11:55:11 PDT 2009


Andy Colson schrieb:
> Hi All,
> 
> 
> Here is a screen shot:
> 
> http://maps.camavision.com/map.jpg
> 
> 
> There are, as far as I can tell, 4 lines.  The label is duplicating and
> I dont want it too.  Here is the layer from the mapfile:
> 
> 
>     LAYER
>         NAME annotate_pin
>         TYPE line
>         STATUS on
>         CLASS
>             NAME "HIGHLIGHT"
>             STYLE
>                 COLOR 0 255 0
>                 OUTLINECOLOR 0 255 0
>                 WIDTH 3
>             END
>             LABEL
>                 TYPE truetype
>                 FONT "Vera"
>                 SIZE 10
>                 COLOR 0 0 0
>                 ANGLE follow
>                 POSITION auto
>                 BACKGROUNDCOLOR 255 255 255
>                 MINDISTANCE 900
>             END
>         END
>     END
> 
> 
> I have played with MINDISTANCE from 0 to 99,000 and it does not seem to
> make a difference.  I googled a little but have not found a useful answer.
> 

If you want to use MINDISTANCE you have to set the SIZEUNITS parameter
at layer level like this:

LAYER
 ...
 SIZEUNITS meters # one of [pixels|feet|inches|kilometers|meters|miles]
 ...
 LABEL
  ...
  MINDISTANCE 500
  ...
 END
 ...
END

So the label wouldn't repeated for distances smaller than 500 meter.


Lars



More information about the MapServer-users mailing list