<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'm trying to understand how to use the 
QueryByPoint function in php/mapscript, but I really don't understand the 
description of the function or how it is supposed to work.&nbsp;&nbsp; 
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Let me explain what I'm trying to do I guess, and 
what I hope this function can accomplish...</FONT></DIV>
<DIV><FONT face=Arial size=2>I have a bunch of addresses complete with latitudes 
and longitudes in a database (it's just a postgres table, I'm not using 
PostGIS).&nbsp;&nbsp; I read the locations from this table and I plot points on 
the map at those locations, colorcoding them by various criteria.&nbsp;&nbsp; I 
then want to be able to click on those points and bring up another web page 
specific to those sites.&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>When I first started this project, I looked at 
queryByPoint but couldn't figure out how to use it so I used another method... I 
turned the map into a client side image map, converting the projected lat/long 
values into pixel values and making those points clickable.&nbsp;&nbsp;&nbsp; 
However, this method breaks down when you zoom in on the map too 
far.&nbsp;&nbsp; It works for a while, but at&nbsp;when zoomed in past a 
&nbsp;certain point it no longer works and makes the entire map link to one 
point.&nbsp;&nbsp;&nbsp; I'm not sure why this happens, but it's very repeatable 
and I can't see anything in my code that would cause this effect.&nbsp; So, i'm 
back to looking at how queryByPoint works.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>My points are drawn in a layer created in 
mapscript, it doesn't initially exist in my mapfile.&nbsp;&nbsp; There is no 
shapefile associated with the points and thus there is no dbf file associated 
with them.&nbsp;&nbsp; The only thing I have is the postgresql table from which 
I'm reading the locations.&nbsp;&nbsp; I'm not sure if this is something 
queryByPoint can access.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>from the documentation:</FONT></DIV>
<DIV><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The query is performed 
on all the shapes that are part of a CLASS 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; that contains a TEMPLATE value or 
that match any class in a<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; layer 
that contains a LAYER TEMPLATE value.</STRONG></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>I'm not sure what this means... what should the template value be, and what 
exactly is the query?&nbsp;&nbsp; Is it just an SQL query?&nbsp; Do I need to be 
using postGIS or another spatially enabled database to do this?</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mode is MS_SINGLE or 
MS_MULTIPLE depending on number of 
results<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; you want. 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Passing buffer &lt;=0 defaults to 
tolerances set in the map file <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
(in pixels) but you can use a constant buffer (specified in 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ground units) 
instead.</STRONG></DIV>
<DIV><STRONG></STRONG>&nbsp;</DIV>
<DIV>Where do these results go?&nbsp;&nbsp; The function only returns an integer 
that tells me whether it had success or failure, so how do I access the query 
results?</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I guess that's enough questions for now... thanks 
in advance for any pointers.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>-Jeff</FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>