steve.tout...@inspq.qc.ca wrote: > > Hi, > I'm starting using mode=legend and I cannot get the proper STATUS value > of my layers definition when STATUS is ON. > My mapfile contains 3 layers, one layer has STATUS ON, another STATUS > DEFAULT and the other STATUS OFF > > In the result of mode=legend I get layer_status = 0 for layers having > STATUS ON or OFF. > I get layer_status = 2 when STATUS = DEFAULT
I didn't double check this, but it seems that you are being caught by the mapserv CGI's "feature" that sets all layers with STATUS ON to OFF by default, and then turns on only the layers explicitly specified in the URL via the layer or layers CGI params. Don't ask me why, that's the way it's always been with the CGI and that's related to the way turning layers on and off works in the traditional CGI HTML templates. Unfortunately I don't think you'll be able to access the STATUS ON values via the CGI, unless you use MapScript, since MapScript does not alter the layer status values by default. Maybe that could be an enhancement for 6.0: to add a CGI param that would allow a CGI call to request that layers with STATUS ON not be turned OFF by default. If Steve is reading this perhaps he could comment. -- Daniel Morissette http://www.mapgears.com/ _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users