[mapserver-users] Label Line Layers Question
    Léveillé, James 
    James.Leveille at mtq.gouv.qc.ca
       
    Mon Jun  2 12:09:03 PDT 2008
    
    
  
Here is an example
  # ========== Hydrographie linéaire avec toponymes ==========
  LAYER
    NAME                  "hyd_lin_topnm"
    PROJECTION
      "init=epsg:42105"
    END
    METADATA
      "wms_name"          "Hydrographie linéaire avec toponymes"
      "wms_title"         "Hydrographie linéaire avec toponymes"
      "wms_abstract"      "Hydrographie linéaire avec toponymes"
      "wms_srs"           "EPSG:4326 EPSG:4269 EPSG:42105 EPSG:32198"
    END
    STATUS                ON
    DUMP                  TRUE
    EXTENT                30000 75000 1709360 2120440
    MAXSCALE              150000
    MINSCALE              1
    TYPE                  LINE
    DATA                  "hydro/hyd_lin_topnm/hydrg_bdat_l100k_20080130"
    LABELITEM             "TOPONYME"
    CLASS
      STYLE
        COLOR             213 210 240
      END
      LABEL
        TYPE              TRUETYPE
        FONT              "verdana"
        SIZE              8
        ANGLE             FOLLOW
        COLOR             25 25 175
        OUTLINECOLOR      255 255 255
        MINDISTANCE       600
        PARTIALS          FALSE
      END
    END
  END
______________________________________________________
JAMES LÉVEILLÉ
Service des systèmes de Mission
Direction des technologies de l'information
Ministère des Transports du Québec
5833, boul. Pierre-Bertrand, 2ième étage
Québec (Québec) G2K 1K7
Téléphone:   (418) 380-2005 poste 227
Télécopieur: (418) 644-6653
james.leveille at mtq.gouv.qc.ca
 
-----Message d'origine-----
De : mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] De la part de Jeshua Lacock
Envoyé : 2 juin 2008 15:06
À : mapserver-users at lists.osgeo.org
Objet : [mapserver-users] Label Line Layers Question
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