<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> </DIV>
<DIV>I have a question about creating annotation layer using phpmapscript. I created layer as follow:</DIV>
<DIV> </DIV>
<DIV> $layer=ms_newLayerObj($map);<BR> $layer->set("name", $name);<BR> $layer->set("data", $data);<BR> $layer->set("type", MS_LAYER_ANNOTAION);<BR> $layer->set("status", MS_ON);<BR> $layer->set("labelitem", $item);<BR> $class=ms_newClassObj($layer);<BR> <BR> $class->label->color->setRGB($color[0],$color[1],$color[2]);<BR> $class->label->outlinecolor->setRGB($outline[0],$outline[1],$outline[2]);<BR> $class->label->set("type", MS_TRUETYPE); <BR> $class->label->set("font", "cordia"); // defned in fontlist file<BR> $class->label->set("size", 14);<BR> $class->label->set("position", MS_CC);<BR> $class->label->set("encoding", "tis620");<BR></DIV>
<DIV>when it came to </DIV>
<DIV> </DIV>
<DIV>$img=$map->draw();</DIV>
<DIV> </DIV>
<DIV>it showed 9 or 10 sentences of:</DIV>
<DIV><STRONG></STRONG> </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> </P>
<P>and error again when it came to</P>
<P> </P>
<P>$img->saveImage($file);</P>
<P> </P>
<P>as</P>
<P> </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). Have I done anything wrong with the code?</P>
<P> </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>