REQUIRES syntax in Mapfile
Neil Fincham
neil at ASDF.CO.NZ
Mon Feb 4 12:55:08 PST 2008
Hi All,
Quick question today, what is the correct syntax for the REQUIRES tag
in the mapfile? I have tried "REQUIRES ([OtherRoad] = 1)" (I.E, the
layer OtherRoad must be on for the layer to display) and a few other
things and I don't seem to be getting any joy. I have included the map
layer definitions below;-
LAYER
NAME 'OtherRoad'
TYPE LINE
CONNECTIONTYPE postgis
CONNECTION 'host=localhost user=postgres dbname=NZMM'
DATA 'the_geom FROM public.road_all_layer2_polyline'
METADATA
'wms_title' 'OtherRoad'
END
MAXSCALE 15000
STATUS ON
LABELITEM "road_name"
TRANSPARENCY 100
CLASS
NAME 'Road - Other'
STYLE
SYMBOL road-line
SIZE 1
COLOR 0 0 0
END
END
END
LAYER
NAME 'MinorRuralRoad'
TYPE LINE
CONNECTIONTYPE postgis
CONNECTION 'host=localhost user=postgres dbname=NZMM'
DATA 'the_geom FROM public.road_all_layer2_polyline'
METADATA
'wms_title' 'MinorRuralRoad'
END
MAXSCALE 15000
STATUS ON
LABELITEM "road_name"
TRANSPARENCY 100
REQUIRES ([OtherRoad] eq 1)
CLASS
NAME 'Minor Rural Road'
EXPRESSION ("[class]" = "MINOR RURAL ROAD")
LABEL
COLOR 0 0 0
FONT sans
TYPE truetype
SIZE 6
POSITION AUTO
PARTIALS FALSE
ANGLE FOLLOW
BUFFER 10
OUTLINECOLOR 255 255 255
END
STYLE
SYMBOL road-line
SIZE 6
COLOR 0 0 0
END
STYLE
SYMBOL road-line
SIZE 5
COLOR 255 0 255
END
END
END
Thanks Heaps
Neil
More information about the MapServer-users
mailing list