REQUIRES syntax in Mapfile
Mike Saunt
mikesaunt at GMAIL.COM
Mon Feb 4 15:58:29 PST 2008
Neil
Another good one is REQUIRES "![LayerName]"
I use this alot to have a base vector layer not draw if Aerial Photography
is shown...
Cheers
Mike
On 04/02/2008, Neil Fincham <neil at asdf.co.nz> wrote:
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080204/ac0a2664/attachment.htm>
More information about the MapServer-users
mailing list