Daniel, I used MS4W 2.2.5 on Windows Vista. I didn't query anything in the code. I only created annotation layer by code. But if I used previous version that was not MS4W suit, it had no error. Is this a bug of this suit?
Krung ----- Original Message ---- From: Daniel Morissette <[EMAIL PROTECTED]> To: [email protected] Sent: Wednesday, October 24, 2007 2:32:19 AM Subject: Re: [UMN_MAPSERVER-USERS] Error when create annotation layer in PHPMapscript Krung Saengpole wrote: > 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); I'm not convinced that this alone would explain the errors you got, but there is a typo here... should be MS_LAYER_ANNOTATION... perhaps try fixing that and see. [...] > 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* > *.....* > *.....* > *.....* > Could it be that you made a queryByRect() between the time the layer was created and the time at which you call $map->draw()? Perhaps try calling ms_ResetErrorList() after the queryByRect() or before the call to $map->draw(). I suspect that the query leaves warnings in the error stack and this may confuse the $map->draw() method. Daniel -- Daniel Morissette http://www.mapgears.com/ __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
