[mapserver-users] queryusing point or querybypoint?

Steven Hayes shayes at bigpond.net.au
Mon Dec 31 21:12:51 EST 2001


Happy new year to all,

I have become truly confused now as to where mapscript stands with querying
and I hope someone can help me.

I am using mapserv 3.3.011 and would rather not change it if possible as I
find recompilation and reinstallation a bit daunting now I have some
functional applications relying on my current installation.

I am trying to do a query using mapscript in order to get information on the
shape that has been clicked. Ideally I would like to simply return REG_ID
which is the first field in the dbase file corresponding to the layer I am
using for my test - I can do everything else I need to with an SQL query
once I get that.

My problem is that not only can I not find clear documentation but what
little I have gleaned via the support lists has now made me question if I am
even using a method that exists. QueryUsingPoint() and QueryByPoint() have
both appeared. Initially I came to believe that QueryUsingPoint() was the
correct method and QueryByPoint() was infact a documentation error. I now
find evidence that suggests that QueryByPoint() has superceeded
QueryUsingPoint() in MapServer V 3.5. Regardless of which method is correct
I can not find any simple example for how to implement. I would thing that
clicking a map to return a single value from a shapefile would be a fairly
standard requirement. Is it or am I not really talking the same language as
other users of MapServ ? Does someone have a simple code snippet or example
?

By the way, apart from documentation frustrations I find the software
excellent and I could not do any of the stuff I am doing now if it had not
been made available as open source.

Regards

Steven Hayes

my test application is at http://www.streamwatch.org.au/cgi-bin/maps_test.pl




More information about the mapserver-users mailing list