[ka-Map-users] Street names on my maps

Clark Endrizzi cendrizzi at gmail.com
Wed Feb 8 12:16:11 EST 2006


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
> street names.  It uses the "verdana" font that is defined in my font list.
>
> For details on the LABEL object, see
> http://mapserver.gis.umn.edu/docs/reference/mapfile/label
>
> Hope it helps,
> Tim
>
> LAYER
>     NAME "Roads"
>     TYPE ANNOTATION
>     STATUS ON
>     TEMPLATE "no template"
>     TOLERANCE 7
>     DATA "path/to/data"
>     LABELITEM "NAME"
>     CLASSITEM "SYMBOL"
>     CLASS
>         EXPRESSION "1"
>         NAME "US Highway"
>         LABEL
>             TYPE TRUETYPE
>             FONT "verdana"
>             ANGLE AUTO
>             PARTIALS FALSE
>             POSITION UC
>             SIZE 7
>             BUFFER 25
>             MINDISTANCE 250
>             COLOR 20 20 80
>             OUTLINECOLOR 200 200 180
>         END
>     END
>     CLASS
>         EXPRESSION "2"
>         NAME "State Route"
>         LABEL
>             TYPE TRUETYPE
>             FONT "verdana"
>             ANGLE AUTO
>             PARTIALS FALSE
>             POSITION UC
>             SIZE 7
>             BUFFER 25
>             MINDISTANCE 250
>             COLOR 20 20 80
>             OUTLINECOLOR 200 200 180
>         END
>     END
>     CLASS
>         EXPRESSION "3"
>         NAME "Major Arterial"
>         LABEL
>             TYPE TRUETYPE
>             FONT "verdana"
>             ANGLE AUTO
>             PARTIALS FALSE
>             POSITION UC
>             SIZE 7
>             BUFFER 25
>             MINDISTANCE 250
>             COLOR 20 20 80
>             OUTLINECOLOR 200 200 180
>         END
>     END
> END
>
>


--
-Clark Endrizzi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20060208/9d9bdb96/attachment.html


More information about the ka-Map-users mailing list