<!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>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#c0c0c0>
<DIV><FONT face=Arial size=2>OK, I figured it out.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$mapObj =
ms_newMapObj("$dataPath/$map.map");<BR>$layerObj =
$mapObj->getLayer(1);<BR>$layerObj->set("status",1);
<---------------------------------------THIS LINE<BR></FONT><FONT face=Arial
size=2></FONT></DIV>
<DIV><FONT face=Arial size=2>header("Cache-Control: no-cache,
must-revalidate");<BR>header("Pragma: no-cache");<BR>header("content-type:
image/jpeg");<BR>$img->saveImage("",MS_JPEG,0,0, 80);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>thanks!!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-jim</FONT></DIV>
<DIV><FONT face=Arial size=2>I always seem to figure things out just after I
post. HRM! oh well, good for the archive</FONT></DIV>
<DIV> </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=jimburnett@ntelos.net href="mailto:jimburnett@ntelos.net">Jim
Burnett</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</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:51
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [mapserver-users] Dynamic Layers
PHP/Mapscript</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hi, I am running mapserver 3.5(night build), with
PHP/Mapscript. </FONT></DIV>
<DIV><FONT face=Arial size=2>I was wondering how to turn a layer on, before it
gets displayed to my browser.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have 3 layers in my map file. Layers 0
and 2 have "status on" Layer 1 has "status off".</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here is what I am trying...</FONT></DIV>
<DIV><FONT face=Arial size=2>I am turning the status of my 2nd layer to "on"
but it still doesnt show up.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$mapObj =
ms_newMapObj("$dataPath/$map.map");<BR>$layerObj =
$mapObj->getLayer(1);<BR>$layerObj->status=1;<BR></FONT><FONT face=Arial
size=2></FONT></DIV>
<DIV><FONT face=Arial size=2>header("Cache-Control: no-cache,
must-revalidate");<BR>header("Pragma: no-cache");<BR>header("content-type:
image/jpeg");<BR>$img->saveImage("",MS_JPEG,0,0, 80);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>thanks!!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-jim</FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></BLOCKQUOTE></FONT></BODY></HTML>