Layer display order (z-index)?
Jackey Cheung
cheung.jackey at GMAIL.COM
Wed May 30 18:23:17 PDT 2007
Here's the part of map file. They are in the order as they are in the map
file, and they are next to each other in the map file. The icons you saw in
the image are bus stops:
MAP
# ......
# Lots of layers here
# ......
Layer
NAME "Streets"
GROUP "Feature"
STATUS DEFAULT
TYPE LINE
CONNECTIONTYPE OGR
CONNECTION "streets.TAB"
DATA "streets"
UNITS METERS
TRANSPARENCY ALPHA
CLASSITEM "TypeCode"
CLASS
MINSCALE 2000000
MAXSCALE 15000000
EXPRESSION "S1"
STYLE
WIDTH 1
COLOR 255 200 64
ANTIALIAS TRUE
END
END
CLASS
MINSCALE 200000
MAXSCALE 2500000
EXPRESSION "S1"
STYLE
WIDTH 3
COLOR 128 100 64
ANTIALIAS TRUE
END
STYLE
WIDTH 2
COLOR 255 200 64
ANTIALIAS TRUE
END
END
# ......
# more similar classes of different types go here
# ......
END
LAYER
NAME "POI"
GROUP "Feature"
STATUS DEFAULT
#MINSCALE 2000
MAXSCALE 25000
TYPE POINT
CONNECTIONTYPE OGR
CONNECTION "POI.TAB"
DATA "POI"
UNITS METERS
TRANSPARENCY ALPHA
#FILTERITEM "Type"
FILTER (("[Type]" == "parks") OR ("[Type]" == "bus") OR
("[Type]" == "rail") OR ("[Type]" == "subway") OR ("[Type]" ==
"ferry"))
CLASSITEM "Type"
# CLASS
# EXPRESSION "parks"
# END
CLASS
EXPRESSION "bus"
SYMBOL "bus stop"
END
CLASS
EXPRESSION "rail"
SYMBOL "kcr"
END
CLASS
EXPRESSION "subway"
SYMBOL "mtr"
END
CLASS
EXPRESSION "ferry"
SYMBOL "kcr"
END
END
# ......
# Even more layers go here
# ......
END
----- Original Message -----
From: "Steve Lime" <Steve.Lime at dnr.state.mn.us>
To: "Jackey Cheung" <cheung.jackey at GMAIL.COM>;
<MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Wednesday, May 30, 2007 05:57
Subject: Re: [UMN_MAPSERVER-USERS] Layer display order (z-index)?
Layers are rendered in the order they appear in the mapfile so I'm not sure
how the POI symbols
could be rendered below the line work. You could try turning them into
annotation instead of point
layers since annotation is always drawn last. You might need to post your
mapfile...
Steve
>>> On 5/29/2007 at 4:06 AM, in message
>>> <C69E8A2815154DF2B5E9416C95DA580F at jackey>,
Jackey Cheung <cheung.jackey at GMAIL.COM> wrote:
> Greetings!
>
> I've put some roads, polygons and poi to my map, their order in the map
> file
> is: polygon layers go first, then road layers, and the poi layer is the
> last.
> A picture is generated like this:
> http://www3.mapasia.com/jackout/mapserv.png
>
> As you can see, those 2 POI icons are covered by roads, can I make those
> POI
> icons always on top of everything else in the map?
>
> I've tried re-ordering layers in the map file, but the icons are kept
> covered
> by roads.
More information about the MapServer-users
mailing list