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

Walt Lin joemayfair at usa.net
Sun Dec 30 04:01:34 EST 2001


It's not mapscript; it's HTML.  If you have an <INPUT TYPE=image
NAME=imagename SRC=...>, when a user clicks on the image, the browser
automatically sends along imagename.x and imagename.y with the CGI
request.

Walt

On Sun, Dec 30, 2001 at 06:03:23PM +1100, Steven Hayes wrote:
> 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