[mapserver-users] variables returned from a map click using mapscript ??

Steven Hayes shayes at bigpond.net.au
Sat Dec 29 23:03:23 PST 2001


Hi,

can anyone clear this up for me as the mapscript doco is obscure (to me at
least)..

I am attempting to convince a piece of perl mapscript code to return an
attribute of a clicked shape. I have great difficulty in working out how to
setup queries in mapscript but I have managed to do this with mapserv and so
I am relying on the query template reference in the map file and the fact
that I am sending mode=query in the query to the script.

I don't actually get what I want (obviously, or I wouldn't be writing this)
but what I find confusing is that I get a value in the resulting query
string for img.x and img.y which correspond to the mouse click. Where do
these come from? There is no reference in mapscript the documentation to
these vars. They seem to be children of the img object and so what other
vars can I expect to get and what are they. Where indeed would they be
documented.

I am viewing the resulting map image via a template passed by my own
software:

http://www.streamwatch.org.au/cgi-bin/elib.pl?special_template=click_map_wit
h_scale

but it basically just does the following:

<form method="GET" action="="/cgi-bin/maps_dev.pl">
<input type="hidden" name="special_template" value="<%special_template%>">
<input type="text" name="mode" value="query">
<input type="text" name="zoom" value="">
<input type="image" name="img" src="/cgi-bin/maps_dev.pl" align="left">

<form>



Regards to all

Steven Hayes




More information about the MapServer-users mailing list