<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><DIV>Hi all,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have a question about creating annotation layer using phpmapscript. I created layer as follow:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;$layer=ms_newLayerObj($map);<BR>&nbsp;$layer-&gt;set("name", $name);<BR>&nbsp;$layer-&gt;set("data", $data);<BR>&nbsp;$layer-&gt;set("type", MS_LAYER_ANNOTAION);<BR>&nbsp;$layer-&gt;set("status", MS_ON);<BR>&nbsp;$layer-&gt;set("labelitem", $item);<BR>&nbsp;$class=ms_newClassObj($layer);<BR>&nbsp;<BR>&nbsp;$class-&gt;label-&gt;color-&gt;setRGB($color[0],$color[1],$color[2]);<BR>&nbsp;$class-&gt;label-&gt;outlinecolor-&gt;setRGB($outline[0],$outline[1],$outline[2]);<BR>&nbsp;$class-&gt;label-&gt;set("type", MS_TRUETYPE); <BR>&nbsp;$class-&gt;label-&gt;set("font", "cordia");&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // defned in fontlist file<BR>&nbsp;$class-&gt;label-&gt;set("size", 14);<BR>&nbsp;$class-&gt;label-&gt;set("position", MS_CC);<BR>&nbsp;$class-&gt;label-&gt;set("encoding", "tis620");<BR></DIV>
<DIV>when it came to </DIV>
<DIV>&nbsp;</DIV>
<DIV>$img=$map-&gt;draw();</DIV>
<DIV>&nbsp;</DIV>
<DIV>it showed 9 or 10 sentences of:</DIV>
<DIV><STRONG></STRONG>&nbsp;</DIV>
<DIV><STRONG>Warning</STRONG>: [MapServer Error]: msQueryByRect(): No matching record(s) found. in <B>D:\Work\testing\area50.php</B> on line <B>40</B></DIV>
<DIV><STRONG>.....</STRONG></DIV>
<DIV><STRONG>.....</STRONG></DIV>
<DIV><STRONG>.....</STRONG></DIV>
<P><STRONG></STRONG>&nbsp;</P>
<P>and error again when it came to</P>
<P>&nbsp;</P>
<P>$img-&gt;saveImage($file);</P>
<P>&nbsp;</P>
<P>as</P>
<P>&nbsp;</P>
<P><STRONG>Fatal error</STRONG>: Call to a member function saveImage() on a non-object in <B>D:\Work\biomass\area50.php</B> on line <B>41</B><BR><BR>But if I created this layer with polygon type, it'd no trouble (surely a little diffenrent code).&nbsp; Have I done anything wrong with the code?</P>
<P>&nbsp;</P>
<P>TIA</P>
<P>Krung</P>
<DIV><BR></DIV></div><br>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com </body></html>