[Tutor] Python and a web image map

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Tue Mar 1 02:33:31 CET 2005



> Save the above as an HTM and click, it should give you the x,y co-ords
> for the browser window excluding scrolbars etc.

It is possible to do this with Python, since a server-side HTML ISMAP will
send its coordinates off as part of the request.  There are some notes
here:

    http://www.algonet.se/~ug/html+pycgi/img.html

The coordinates we get back are in terms of the pixels of the image, so
translating to a latitidue/longitude system will probably take some more
work.

Best of wishes!



More information about the Tutor mailing list