[ms4w-users] Error when create annotaion layer in phpmapscript.

Krung Saengpole saengpole at yahoo.com
Thu Oct 25 15:33:11 EDT 2007

Hi all,

I just used MS4W 2.2.5 for the first time. I created annotation layer by code as:

 $map=ms_newMapObj(...map file name...);
 $layer->set("name", "amp");
 $layer->set("data", "ampdata");
 $layer->set("type", MS_LAYER_ANNOTAION);
 $layer->set("status", MS_ON);
 $layer->set("labelitem", "amp_name");
 $class->label->set("type", MS_TRUETYPE); 
 $class->label->set("font", "cordia");  // this is set in fontlist file
 $class->label->set("size", 14);
 $class->label->set("position", MS_CC);

but when it came to $image=$map->draw(); it showed warnings 9 or 10 sentences like below:

Warning: [MapServer Error]: msQueryByRect(): No matching record(s) found. in D:\Work\test\area50.php on line 42

so $image->saveImage(..image file..); was error. But if I created polygon layer with this data it showed as it should. So, I tried to use the above code with previous phpmapscript (not in ms4w suit), php_mapscript_48.dll, it worked. What's wrong with my code for using with ms4w?


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20071025/682410db/attachment.html

More information about the ms4w-users mailing list