[Mapserver-users] Re: need some help with queryByPoint()

pkishor_98 pkishor at geoanalytics.com
Mon Aug 4 14:55:36 EDT 2003


Bhavana,


--- In mapserver-users at yahoogroups.com, "Charlton Purvis"
<cpurvis at a...> wrote:
> Hi, Bhavana:
> 
> OK, you REALLY need to at least cc the list w/ your questions rather
> than email directly.  

as Charlton has said before, and very rightly, please post your
questions to the list instead of directly to list members.

Now, to cover the basics of what goes on with Mapserver --

..
> up, but now am having a different problem.
> 
> When I zoom_in/zoom_out/pan pan on the image, and then 
> try to query the image, I don't think the x,y co-ordinates 
> that I'm passing is right. My guess is, the x/y 
> co-ordinates are with respect to the new 
> zoomed_in/zoom_out/panned image and not with respect to 
> the original image.
> 
> Hence when I geo reference this new point and try to query 
> it, the dbf file does not return any results. Would you 
> have any pointers how to fix this.
> 

Since one page load (user click) on the web doesn't know from another
because http is a stateless protocol, you have to somehow tell the
subsequent click "where you came from" in order to calculate "where to
go." You do that typically by passing hidden form variables back and
forth between the user's browser and the server.

At any given time if the user looks at the source code of the html in
her browser, she will see the mapextent (geographic coords) of what is
visible on the screen -- lets call this "Map A." Clicking on "Map A"
generates and sends back to the server x and y coords (image coords)
of the mouse click as well as the mapextent of "Map A."

Back at the server you use the mapextent of "Map A" to convert the x
and y coords into geographic space so you can do things with it such
as query features or calculate new mapextent. Once this new mapextent
is calculated on the server, you once again stuff it into hidden form
variables and send it back to the user... this is now the new map...
let's call it "Map B."

And so on the cycle continues.


> I have attached the phtml code with this email. Please 
> take a look at it if you can spare some time. I really 
> appreciate your help.


I hope the above gives you the concept behind the mechanics of
creating and sending images to the browser.

If you have further questions, please post back to the list.

Puneet.




More information about the mapserver-users mailing list