Error when create annotation layer in PHPMapscript
Krung Saengpole
saengpole at YAHOO.COM
Tue Oct 23 11:22:13 PDT 2007
Hi all,
I have a question about creating annotation layer using phpmapscript. I created layer as follow:
$layer=ms_newLayerObj($map);
$layer->set("name", $name);
$layer->set("data", $data);
$layer->set("type", MS_LAYER_ANNOTAION);
$layer->set("status", MS_ON);
$layer->set("labelitem", $item);
$class=ms_newClassObj($layer);
$class->label->color->setRGB($color[0],$color[1],$color[2]);
$class->label->outlinecolor->setRGB($outline[0],$outline[1],$outline[2]);
$class->label->set("type", MS_TRUETYPE);
$class->label->set("font", "cordia"); // defned in fontlist file
$class->label->set("size", 14);
$class->label->set("position", MS_CC);
$class->label->set("encoding", "tis620");
when it came to
$img=$map->draw();
it showed 9 or 10 sentences of:
Warning: [MapServer Error]: msQueryByRect(): No matching record(s) found. in D:\Work\testing\area50.php on line 40
.....
.....
.....
and error again when it came to
$img->saveImage($file);
as
Fatal error: Call to a member function saveImage() on a non-object in D:\Work\biomass\area50.php on line 41
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?
TIA
Krung
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20071023/a10dc080/attachment.htm>
More information about the MapServer-users
mailing list