<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4616.200" name=GENERATOR></HEAD>
<BODY bgColor=#c0c0c0>
<DIV>I just figured that out. LOL<BR>I always post a mesasge, then figure it our
like just a few minutes after I post. Gosh! :-)<BR><BR><BR>-jim<BR><BR></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=assefa@dmsolutions.ca href="mailto:assefa@dmsolutions.ca">Assefa
Yewondwossen</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=jimburnett@ntelos.net
href="mailto:jimburnett@ntelos.net">Jim Burnett</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Cc:</B> <A
title=mapserver-users@lists.gis.umn.edu
href="mailto:mapserver-users@lists.gis.umn.edu">mapserver-users@lists.gis.umn.edu</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, August 15, 2001 9:59
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [mapserver-users] Dynamic
Layers PHP/Mapscript</DIV>
<DIV><BR></DIV>Hi there, <BR>
<P> You should use something like this : <BR> ....
<BR> <FONT face=Arial><FONT size=-1>$layerObj =
$mapObj->getLayer(1);</FONT></FONT> <BR><FONT face=Arial><FONT
size=-1> $layerObj->set("status", 1);</FONT></FONT>
<BR> ....
<P>Bye,
<P>Jim Burnett wrote:
<BLOCKQUOTE TYPE="CITE">
<STYLE></STYLE>
<FONT face=Arial><FONT size=-1>Hi, I am running mapserver 3.5(night build),
with PHP/Mapscript.</FONT></FONT><FONT face=Arial><FONT size=-1>I was
wondering how to turn a layer on, before it gets displayed to my
browser.</FONT></FONT> <FONT face=Arial><FONT size=-1>I have 3 layers
in my map file. Layers 0 and 2 have "status on" Layer 1 has "status
off".</FONT></FONT> <FONT face=Arial><FONT size=-1>Here is what I am
trying...</FONT></FONT><FONT face=Arial><FONT size=-1>I am turning the
status of my 2nd layer to "on" but it still doesnt show
up.</FONT></FONT> <FONT face=Arial><FONT
size=-1>$mapObj = ms_newMapObj("$dataPath/$map.map");</FONT></FONT>
<BR><FONT face=Arial><FONT size=-1>$layerObj =
$mapObj->getLayer(1);</FONT></FONT> <BR><FONT face=Arial><FONT
size=-1>$layerObj->status=1;</FONT></FONT><FONT face=Arial><FONT
size=-1>header("Cache-Control: no-cache, must-revalidate");</FONT></FONT>
<BR><FONT face=Arial><FONT size=-1>header("Pragma: no-cache");</FONT></FONT>
<BR><FONT face=Arial><FONT size=-1>header("content-type:
image/jpeg");</FONT></FONT> <BR><FONT face=Arial><FONT
size=-1>$img->saveImage("",MS_JPEG,0,0,
80);</FONT></FONT> <FONT face=Arial><FONT
size=-1>thanks!!</FONT></FONT> <FONT face=Arial><FONT
size=-1>-jim</FONT></FONT> </BLOCKQUOTE>
<P>-- <BR>----------------------------------------------------------------
<BR>Assefa Yewondwossen <BR>Software Analyst
<P>Email: assefa@dmsolutions.ca <BR><A
href="http://www.dmsolutions.ca/">http://www.dmsolutions.ca/</A>
<P>Phone: (613) 565-5056
<BR>----------------------------------------------------------------
<BR> </P></BLOCKQUOTE></BODY></HTML>