Label layer...

Jeff Portwine jdport at VERITIME.COM
Wed Apr 6 09:24:20 EDT 2005


I generally make 2 layers.. one of type point, and one of type annotation.
You can choose whether or not to display the annotation layer at any time
without affecting the point layer at all.

Here is an example that i pulled out of one of my map files, and edited to
make an example.

LAYER
     Name cities
     DATA citiesx020
     STATUS default
     TYPE point
  PROJECTION
    "proj=latlong"
  END
  CLASS
    NAME "Cities"
    symbol "circle"
    color 0 0 0
  END
END

  LAYER
    NAME       city_name_labels
    DATA        citiesx020
    STATUS      default
    TYPE        annotation

    LABELITEM "name"
    PROJECTION
      "proj=latlong"
    END
    CLASS
      LABEL
        FORCE TRUE
        COLOR 0 0 0
        SIZE tiny
        POSITION CC
        PARTIALS false
      END
    END

Hope that helps.

-Jeff

----- Original Message -----
From: "Paul james" <pauljame at GMAIL.COM>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Wednesday, April 06, 2005 8:59 AM
Subject: [UMN_MAPSERVER-USERS] Label layer...


Hi, I have a point layer with a label... I´d like to know how can I
turn on/turn off only the label ... May I do other layer ? Sample??
I´m using php/mapscript

Thank you

LAYER
NAME state
TYPE POINT
STATUS ON
CONNECTIONTYPE POSTGIS
CONNECTION "user=x password=x dbname=x host= x"
DATA "the_geom from states"
LABELITEM "name"
LABELCACHE ON

CLASS
NAME "state_"
OUTLINECOLOR 255 0 0
COLOR 10 90 10
SYMBOL 'circle'
                SIZE 5
LABEL
                  FONT fritqat
SIZE 6
TYPE TRUETYPE
COLOR 255 0 0
FORCE TRUE
OUTLINECOLOR 255 200 200
PARTIALS TRUE
POSITION AUTO
END
END



More information about the mapserver-users mailing list