[mapserver-users] PHP Mapscript and querying/point conversion.

Stephen Woodbridge woodbri at swoodbridge.com
Sun Jun 30 07:05:01 PDT 2002


Ben,

Check out the gmap application the DM Solutions has made available. It
does this. You have to convert the pixels to georeferenced coords, try a
simple ratio of the height of you image in pixels to the height in
georeferenced is to the pixel the user clicked on.

-Steve

Ben Logan wrote:
> 
> Hi again,
> 
> I would like to perform queries with PHP Mapscript, but I can't quite
> figure out how.  What I would like is for the user to click on the
> map image, and my script to return info on the shape closest to the
> click (for example a road, river, etc).  Can anyone give me pointers
> on how to do this?
> 
> One thing that is confusing me, is that all of the query functions
> take georeferenced coords as args, but I never know anything but the
> pixel coords of a user click.  I haven't been able to figure out how
> to convert between pixel and georeferenced coordinates.
> 
> Thanks for any help,
> Ben
> 
> --
> Ben Logan: ben at wblogan dot net
> OpenPGP Key KeyID: A1ADD1F0
> 
> Anything is possible on paper.
>                 -- Ron McAfee



More information about the MapServer-users mailing list