Allow users to click on areas of a map or picture to get more information on the subject represented there. |
To define a map, get an image and find the pixel coordinates of the "hot spots" (link areas). xv is a handy program for this. |
Each hotspot has a shape of circle, polygon, or rectangle. The rectangle is given by Upper Left corner and Lower Right corner pixel coordinates, the circle by Center and an edge-point, and the polygon by a sequence of points. |
Example definition of an image map file (called usa.map) with two hot spots: |
default default.html |
rect /map/indiana.html 230,100 260,150 |
circle /map/rhodeisland.html 600,90 600,85 |
Put a link to an image map in your html document and use the ISMAP attribute in the <img> tag that refers to the actual image. |
<a href="http://www.orc.com/map/usa.map"> |
<img src="map/usa.gif" ISMAP></a> |