[mapserver-users] Layer status on/off
nikos at maich.gr
nikos at maich.gr
Tue Oct 26 07:48:07 PDT 2010
Hi,
Would like to be able to display a layer, after a join w/ an external table.
My definition is below....
Is this the approach? Using cgi and intend to toggle the layer on/off w/ a
status parameter.
Is this the usual approach, any better way to do this?
I also need to display the layer in general (with out the class), along
with other layers...
If I'm able to toggle a class, I guess I could define define another
class, e.g. "gid>0" to display the geom????
would appreciate some help....
regards,
nikos
pS just saw that there's a status for class objects....
STATUS [on|off]
Sets the current display status of the class. Default turns the class on.
##### 2 Layer Energy crop yield
LAYER
METADATA
'qstring_validation_pattern' '.'
END
NAME "yield"
CONNECTIONTYPE postgis
CONNECTION "dbname=IUNG user=postgres host=localhost password=xxxx1 "
DATA "the_geom FROM (SELECT landunit_karditsa.gid AS gid,
landunit_karditsa.the_geom AS the_geom,
perclu.cotton as cotton, perclu.encrop as encrop
FROM landunit_karditsa JOIN perclu ON
landunit_karditsa.gid = perclu.objectid)
AS nikos_join USING UNIQUE gid USING SRID=-1"
STATUS OFF
TYPE POLYGON
CLASSITEM 'cyna'
CLASS
NAME "cynara_crop"
EXPRESSION ('[cyna]' == 0)
STYLE
backgroundcolor 0 128 128
OUTLINECOLOR 204 153 51
color 255 0 0
WIDTH 3
END
END
END
####End yield
More information about the MapServer-users
mailing list