[mapserver-users] passing coordinates to a postgis query

mark balman mark.balman at gmail.com
Thu Dec 4 07:14:35 EST 2008


Hi all

I am trying to pass latitude and longitude coordinates to a postgis
query but I am getting confused. So far I have tried to use the
following DATA definition as follows:

DATA "the_geom FROM (select * from kbapoly where
st_distance(the_geom,GeomFromText('Point(%mapy% %mapx%)',4326)) <6) AS
myquery using SRID=4326 using unique gid"

where mapy and mapx are the mapserver X and Y coordinate of mouse
click. Alas this is not working and any suggestions or pointers would
be most welcomed,

Thanks in advance

Mark


More information about the mapserver-users mailing list