question about turning layers ON

kenboss kenboss at dilbert.dnr.state.mn.us
Mon Dec 4 10:13:25 EST 2000


If a layer's STATUS is set to "DEFAULT" then the layer will always be drawn.  If 
STATUS is set to "ON" then the layer will be drawn if it is (one of) the 
value(s) specified in the "layer" cgi variable.

In the demo, all layers in the demo.map file are STATUS ON excepting for the 
county boundaries layer, which is STATUS DEFAULT.  The layers to be initially 
displayed are set via hidden variables in the cgi form in the demo_init.html 
file.  [layername_select] is then used in the demo.html layer select list as a 
means of making layer selections persistent as the user browses the map.  When a 
layer is included in the "layer" cgi variable, the mapserver program replaces 
[layername_select] with the keyword "selected".  If a layer is not included in 
the "layer" cgi variable, then [layername_select] is replaced with an empty 
string.

Hope this helps,

--Ken Boss 


> Date: Fri, 01 Dec 2000 09:44:26 -0500
> From: Michael Hearne <Michael.Hearne at noaa.gov>
> X-Accept-Language: en
> MIME-Version: 1.0
> To: mapserver-users at lists.gis.umn.edu
> Subject: question about turning layers ON
> Content-Transfer-Encoding: 7bit
> 
> I'm trying to build a simple mapserv app, and I'm confused about how the 
> 
> [layername_select] template is supposed to work.
> 
> What parameter in the map file controls whether a layer is selected or
> not when the
> map initially comes up?  I'd thought it was the "STATUS" keyword, but
> the demo application has
> almost all of the layers' STATUS set to "ON", yet only lakes and streams
> come up initially.
> 
> What's the deal?
> 
> Thanks in advance,
> 
> Mike Hearne
> -- 
> Michael G. Hearne     	  	email: Michael.Hearne at noaa.gov  
> Coastal Remote Sensing  		phone: 843 740-1281             
> TPMC/NOAA Coastal Services Center	fax:   843 740-1312       
> 2234 S. Hobson Ave.,    Charleston, SC 29407




More information about the mapserver-users mailing list