Department of Computing Imperial College
Imagemaps

An imagemap is accessed by using two combined "tricks" of HTML.

The first is to call the imagemap program with the name of the map file that describes the regions of the image that the user can click on. This is given as '/filename' following the imagemap URL.

The second is to flag the image as being a clickable map with 'ismap'.

In the example below you will see a call to the program imagemap. The /~lmjm/crest.map specifies the map file to be used. The img command ends with the ismap being set, to make the image clickable.

An example of imagemap use

<title>test.</title>

<A TARGET="_top" HREF="http://www.doc.ic.ac.uk/cgi-bin/imagemap/~lmjm/crest.map">
<img src="/icons/Crest+Dept.gif" ismap>
</a>
Where /~lmjm/crest.map, which is in ~lmjm's public html area reads:
rect http://www.doc.ic.ac.uk/~lmjm/dept.html 117,8 202,47 
rect http://www.doc.ic.ac.uk/~lmjm/all.html 1,1 406,114 
rect http://www.doc.ic.ac.uk/~lmjm/of.html 203,9 240,44 
and was created using /homes/lmjm/bin/sun4/mapedit a simple and far from perfect program.

CSG / 1997 / help@doc.ic.ac.uk