addFeature and queryByPoint in PHP mapscript

Camden Daily cdaily at GMAIL.COM
Thu Mar 3 15:24:35 EST 2005


I opened a bug on this issue a while back, but haven't seen any updates on it:
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=806

In the bug writeup, I appended a new version of the php_mapscript.c
file (for mapserver 4.4.1) that allows the index to be set.  I just
altered the code in the shape->set() function.  Try grabbing that file
from the bug writeup and recompiling mapscript with the new file.

When you're setting the indexes for later use by querybypoint, they
cannot be arbitrary numbers.  You have to set the index values in the
order that the shapes are added to the layer, starting with index 0.

If you have any other questions about it, let me know.
-Camden Daily

On Thu, 3 Mar 2005 13:21:21 -0600, Ken Sanderson <ken at sandnarrows.com> wrote:
> I am wondering about this as well. How can I set the index value using
> PHPmapscript?
>
> This:
>
> $shp->set(index,$id);
>
> returns a read only error and this:
>
> $shp->{index} = $id;
>
> returns a "Use of undefined constant index - assumed 'index' in"
>
> So how can we set the index values so that the points can be queried?
>
> Thanks,
>
> Ken
>



More information about the mapserver-users mailing list