[mapserver-users] mapfile: displaying a feature from a shapefile.
Christy Nieman
cnieman at dmsolutions.ca
Mon Jan 26 04:30:58 PST 2009
Hi,
As already mentioned, what is missing is the LABELITEM in your layer
definition. Without this, MapServer will not know what attribute to use
for labelling. Your layer should look something like this:
# Road tracks
LAYER
NAME 'mytown'
TYPE LINE
DATA '/var/www/manual/examples/mytown/data/mytown.shp'
* LABELITEM "road_name"*
METADATA
'wms_title' 'mytown'
'gml_include_items' 'all'
END
DUMP TRUE
STATUS DEFAULT
TRANSPARENCY 80
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
STYLE
COLOR 102 0 0
SIZE 2
SYMBOL "line_solid"
END
STYLE
COLOR 204 51 51
SIZE 1
SYMBOL "line_solid"
END
LABEL
TYPE truetype
FONT "PerspectiveBlack"
SIZE 11
END
END
END
Best regards,
Christy
--
Christy Nieman
GIS Technician
DM Solutions Group, Inc.
Email: cnieman at dmsolutions.ca
Web: http://dmsolutions.ca
Web: http://research.dmsolutions.ca
kende wrote:
> Hi Jukka,
>
> Thank you for your reply, I did RTFM before posting my question, and tried
> LABELITEM (that was one of the several 'ways' quote in my original post),
> also tried a separate layer for just the road names (separate and grouped),
> and may other things, and none seemed to work, I didn't want to add too much
> clutter
> to my post, and my mapfile went through a lot of 'revisions/versions'.
>
> Thanks.
>
>
> Hi,
>
> Looks like there is no LABELITEM set on layer descriptions. Document "An
> introduction to MapServer" (http://www.mapserver.org/introduction.html) does
> mention LABELITEM but that part of text is messy. Perhaps it should be
> reviewed.
>
> -Jukka Rahkonen-
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090126/62c11a4b/attachment.htm>
More information about the MapServer-users
mailing list