|
|
|
|
You are visitor number
Image Maps First you'll need a graphic to use for the image map, and you'll need to find a program that will show you the x,y coordinates for the graphic. GraphicConverter does this on a Mac, I understand MapThis does it for Win/Win95. (If all else fails you may be able to get your browser to show you by linking to the imagemap graphic (using the ISMAP tag) before you make the .map file.) Note that 0,0 is on the upper left. The first number (x) increases from left to right, the second number (y) increases from top to bottom.
Example... Here's an image map...
<A HREF="demomap.map">
<IMG ISMAP SRC="demomap.GIF"></A>
And the .map file that is referenced... (demomap.map)
default none.html
circle circle.html 100,100 50,100
rect rect.html 125,10 215,165
poly poly.html 50,250 150,300 250,200 150,250 100,200
The default is the URL that is referenced if you click outside of a defined area. The circle is defined with the center and any point on the perimeter. The rectangle is defined by two opposite corners. The polygon is defined by the points. (note that you do not need to "close" the polygon, a straight line is assumed from the last point to the first.) When two shapes overlap (like the circle and rectangle) the one that comes first in the .map file takes precedence. These two things are all you need! (i.e., a properly written link in the page that uses the map, and a .map file in your directory) No other files are needed (besides the ones that are referenced, like circle.html, none.html, etc. The URLs can be written in all the standard URL forms, i.e., reletive, absolute, etc)
An Alternative Method... Instead of defining shapes, you can define points. There is no need for a default when using the points method. (Points can be mixed with shapes as well, if you add one or more point references there is no need for a default URL)
<A HREF="demomap2.map">
<IMG ISMAP SRC="demomap2.GIF"</A>
...and the file demomap2.map
point a.html 100,50
point b.html 100,100
point c.html 50,150
point d.html 250,200
For an example of a practical use of an image map (using the second method) visit the Bellows Falls (VT) Historic District Self-Guided Walking Tour Formmail For those who would like to have the contents of web page forms emailed back to them, we have added access to formmail. A working example of this script can be found on our Forms Demonstration Page. At the bottom of the page are additional formmail script links. Post-query Here is an example borrowed from http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html (Worth checking out for more tips) The line to play with here is <FORM METHOD="POST" ACTION="http://cgi.sover.net/cgi-bin/post-query"> This doesn't really do anything or send anything anywhere (except back to your browser) so click on things and order away.
|
|