[ka-Map-users] Street names on my maps
Brock Anderson
banders at refractions.net
Wed Feb 8 13:28:44 EST 2006
Clark,
The .shp and the .dbf files are tightly related, and Mapserver will read
them both for the same layer. You don't need a separate layer for the
labels. As Christian mentioned in a previous post, just put a LABEL
block into your CLASS. In order to tell mapserver which attribute from
the .dbf file to use for road labelling, you also need a LABELITEM line
in your LAYER. Christian's example demonstrates these things.
Brock
Clark Endrizzi wrote:
>Ok, follow up question (again, sorry for asking here but thanks for the
>help).
>
>I'm not a mapper myself.
>
>Anyway, for my current shape file I have this defenition:
> LAYER
> NAME slc_major_roads
> TYPE LINE
> STATUS ON
> DATA "utah_data/slco_major_roads_new.shp"
> CLASS
> NAME "SLC Major Roads"
> STYLE
> SYMBOL "circle"
> SIZE 7
> COLOR 0 0 0
> END
> STYLE
> SYMBOL "circle"
> SIZE 5
> COLOR 255 255 0
>
> END
> #STYLE
> # SYMBOL "dashed"
> # SIZE 1
> # COLOR 0 0 0
> #END
>
> END
> END
>
>The draws some nice yellow roads (look here to see it:
>http://dev.naiutah.com/KaMap/cvs_version/htdocs/)
>
>THis shape file also has the dbf file that should have the labels. So to
>get the labels showing would I create a second layer definition of type
>annotation or could I something do it within the existing layer defenition?
>
>Thanks,
>Clark
>
>On 2/8/06, Tim Schaub <tim.schaub at gmail.com> wrote:
>
>
>>Hey Clark-
>>
>>
>>
>>>Can anyone give me a heads up on how to do street names?
>>>
>>>
>>You can add LABEL objects to any CLASS object within any of your
>>layers. In
>>ka-Map, if you want your annotation to show up on top of all other grouped
>>layers, you're best off creating a layer of TYPE ANNOTATION and putting
>>that
>>in a group on the bottom of your mapfile (last to draw).
>>
>>I've pasted a sample annotation layer below. This is from a roads
>>shapefile
>>with a "SYMBOL" field that defines classes and a "NAME" field that
>>contains
>>
>>
More information about the ka-Map-users
mailing list