[mapserver-users] Label Line Layers Question
Stephen Woodbridge
woodbri at swoodbridge.com
Mon Jun 2 14:33:44 PDT 2008
Yup,
> LAYER
> CONNECTIONTYPE postgis
> NAME "roads"
> CONNECTION "user=postgres dbname=ca_hwy host=localhost"
> DATA "the_geom FROM (SELECT roads.oid AS oid, roads.the_geom AS
> the_geom, roads.fename AS fename FROM roads) AS named_roads USING UNIQUE
> oid USING SRID=-1"
> STATUS ON
> TYPE LINE
> LABELITEM fename
> CLASS
> SIZE 2
> COLOR 0 0 0
> LABEL
> POSITION auto
> ANGLE follow
> SHADOWCOLOR 120 255 120
> SHADOWSIZE 1 1
> SIZE 8
> COLOR 0 192 0
> FONT sans-bold
> TYPE truetype
> BUFFER 4
> MINDISTANCE 200
> ANTIALIAS TRUE
> END
> END
> END
-Steve W
Jeshua Lacock wrote:
>
> Greetings,
>
> I am working on a tutorial for MapServer using a Postgis backend, and I
> just want to check if I am setting a correct example. This is my first
> .map file so please forgive me for my noob question.
>
> Is there a way to have text labels and lines on the same layer? Instead
> of two Postgis queries, I was wondering if it is possible to do with a
> single query.
>
> Here is the pertinent portion of my .map files:
>
> LAYER
> CONNECTIONTYPE postgis
> NAME "roads"
> CONNECTION "user=postgres dbname=ca_hwy host=localhost"
> DATA "the_geom FROM (SELECT roads.oid AS oid, roads.the_geom AS
> the_geom, roads.fename AS fename FROM roads) AS named_roads USING UNIQUE
> oid USING SRID=-1"
> STATUS ON
> TYPE ANNOTATION
> LABELITEM fename
> CLASS
> LABEL
> POSITION auto
> ANGLE follow
> SHADOWCOLOR 120 255 120
> SHADOWSIZE 1 1
> SIZE 8
> COLOR 0 192 0
> FONT sans-bold
> TYPE truetype
> BUFFER 4
> MINDISTANCE 200
> ANTIALIAS TRUE
> END
> END
> END
>
> LAYER
> CONNECTIONTYPE postgis
> NAME "roads"
> CONNECTION "user=postgres dbname=ca_hwy host=localhost"
> DATA "the_geom FROM roads USING UNIQUE oid USING SRID=-1"
> STATUS ON
> TYPE LINE
> CLASS
> SIZE 2
> COLOR 0 0 0
> END
> END
>
>
> Thanks,
>
> Jeshua Lacock, Owner
> <http://OpenOSX.com>
> phone: 877.240.1364
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list