<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.2900.3395" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Arial size=2>Dear List,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><PRE><FONT face=Arial size=2>I'm trying to change a symbol for ONE point layer called 'poi' dynamically within 
PHP/Mapscript.  After searching the mail archive and trying a 
few variations of what seemed correct, I'm not succedding. The map only shows one type of symbol.</FONT></PRE><PRE><FONT face=Arial size=2>LAYER<BR>&nbsp;&nbsp;&nbsp;&nbsp; NAME "poi"<BR>&nbsp;&nbsp;&nbsp;&nbsp; STATUS on<BR>&nbsp;&nbsp;&nbsp;&nbsp; TYPE point&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp; LABELCACHE on<BR>&nbsp;&nbsp;&nbsp;&nbsp; TOLERANCEUNITS METERS</FONT></PRE><PRE><FONT face=Arial size=2>END</FONT></PRE></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>php&nbsp;script:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>public static function AddPoints ( $map, 
$qresult ) {</FONT></DIV>
<DIV><FONT size=2><BR><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp; 
$this_layer = 
$map-&gt;getLayerByName('poi');&nbsp;&nbsp;//QueryLayer</FONT></FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp;&nbsp; $i = 
0;<BR>&nbsp;&nbsp;&nbsp;&nbsp; foreach($qresult as $row) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $poi[$i] = 
ms_newPointObj();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; $ln[$i] =&nbsp; 
ms_newLineObj();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; $shp[$i] = 
ms_newShapeObj(MS_SHAPE_POINT);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$poi[$i]-&gt;setXY($row[1],$row[2]);&nbsp;</FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$ln[$i]-&gt;add($poi[$i]);&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$shp[$i]-&gt;add($ln[$i]);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$shp[$i]-&gt;set(index, $row[0]);<BR></FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp;&nbsp;if ($row[7]&nbsp;== 1)&nbsp; 
//&nbsp;show red symbol</FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp;&nbsp; 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face="Courier New" 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $class = 
ms_newClassObj($this_layer);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$class-&gt;set("name",depot_red);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$class-&gt;setExpression("rot");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$class-&gt;set("template",dummy.html);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$style=ms_newStyleObj($class);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$style-&gt;set("symbolname",depot_red);&nbsp;&nbsp;&nbsp; //the gif</FONT><FONT 
face="Courier New" size=2><BR>&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;else&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
//&nbsp;show green symbol<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp; $class = 
ms_newClassObj($this_layer);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$class-&gt;set("name",depot_green);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$class-&gt;setExpression("green");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$class-&gt;set("template",dummy.html);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$style=ms_newStyleObj($class);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$style-&gt;set("symbolname",depot_green);&nbsp;&nbsp; //the 
gif<BR>&nbsp;&nbsp;&nbsp; }<BR></FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$this_layer-&gt;addFeature( $shp[$i] 
);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $i++;<BR>&nbsp;}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>