<!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> </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.
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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). I read the locations from this table and I plot points on
the map at those locations, colorcoding them by various criteria. I
then want to be able to click on those points and bring up another web page
specific to those sites. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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.
However, this method breaks down when you zoom in on the map too
far. It works for a while, but at when zoomed in past a
certain point it no longer works and makes the entire map link to one
point. 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. So, i'm
back to looking at how queryByPoint works.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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. There is no
shapefile associated with the points and thus there is no dbf file associated
with them. The only thing I have is the postgresql table from which
I'm reading the locations. I'm not sure if this is something
queryByPoint can access.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>from the documentation:</FONT></DIV>
<DIV><STRONG> The query is performed
on all the shapes that are part of a CLASS
<BR> that contains a TEMPLATE value or
that match any class in a<BR> layer
that contains a LAYER TEMPLATE value.</STRONG></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>I'm not sure what this means... what should the template value be, and what
exactly is the query? Is it just an SQL query? Do I need to be
using postGIS or another spatially enabled database to do this?</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><STRONG> Mode is MS_SINGLE or
MS_MULTIPLE depending on number of
results<BR> you want.
<BR> Passing buffer <=0 defaults to
tolerances set in the map file <BR>
(in pixels) but you can use a constant buffer (specified in
<BR> ground units)
instead.</STRONG></DIV>
<DIV><STRONG></STRONG> </DIV>
<DIV>Where do these results go? 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> </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> </DIV>
<DIV><FONT face=Arial size=2>-Jeff</FONT></DIV>
<DIV> </DIV></BODY></HTML>