[mapserver-users] labeling
Joe Bussell
joe at otsys.com
Wed Jul 10 15:56:35 PDT 2002
We use a road classification value which is present in our *.dbf files.
The trick is to define different classes depending on the data.
LAYER
NAME cityCenter
GROUP defaultLayer
TYPE POINT
TILEINDEX td_sm.shp
STATUS ON
LABELITEM "NAME"
CLASSITEM "DISPCLASS"
MAXSCALE 9000
CLASS
EXPRESSION ( ( [DISPCLASS] = 3 ) )
#NAME "Big City"
...
END
CLASS
EXPRESSION ( ( [DISPCLASS] = 6 ) )
#NAME "Medium City"
...
END
END
For roads it is very similar, except I have a functional road class to
work with.
Joe Bussell
On Time Systems
On Wed, Jul 10, 2002 at 12:41:26PM -0700, Seamus Thomas Carroll wrote:
> Hi,
>
> I am labeling various cities and roads I have the problem of roads and
> smaller cities being labelled and the larger cities not being labeled.
> All cities are part of the same layer and all roads are part of the same layer.
> The map file is outlined as follows:
>
> LAYER # road drawing layer
>
> CLASS
> # highway drawing layer
> END
>
> CLASS
> # road drawing layer
> END
> END # end of road drawing layer
>
> LAYER # road label layer
>
> CLASS
> # highways label info
> END
>
> CLASS
> # road label info
> END
> END # end of road label layer
>
>
> LAYER # city layer
>
> CLASS
> #Largest city info
> #Labeling and drawing of points
> END
>
> CLASS
> #Medium city info
> END
>
> CLASS
> #Small city info
> #Labeling and drawing of points
> END
> END # end of city layer
>
> I want the labeling to go in this order of precedence:
> 1) larger city
> 2) small city
> 3) highway
> 4) road
> Any suggestions?
>
> At some zoom levels things look correct and at others they dont. I have
> tried changing the order of the layers and the order of the classes
> within the layers. The FORCE command wont be useful because there are
> major cities side by side and I dont want overlap.
> Thanks for reading this far and any suggestions would be much appreciated.
>
> Seamus
>
>
More information about the MapServer-users
mailing list