How to create an IMAGEMAP
An imagemap is an image in which different regions are defined;
clicking in a particular region takes you to the specified URL.
Imagemaps can be set up on both the web.mit.edu and www.mit.edu
servers. There should be no difference which server you chose to
run your imagemap on; the only issue is one of convenience.
An imagemap requires three elements:
1. The image itself
2. An image configuration file (mapfile)
3. An anchor reference from the page on which the imagemap will appear
1. The image itself can be in any format which is supported by the
server and the browser; common image formats are gif and jpeg.
2. The image configuration file defines regions and specifies URLs for
each region. There are four types of command which can be used:
default PUT_URL_HERE
This specifies that clicking in an otherwise undefined region goes to
the default URL specified.
circle (x,y) r
PUT_URL_HERE
This defines a region which is a circle centered at (x,y) with radius r.
Clicking in the region goes to the URL specified.
rectangle (x1,y1) (x2,y2)
PUT_URL_HERE
This defines a region which is a rectangle with corners at (x1,y1) and
(x2,y2). Clicking in the region goes to the URL specified.
polygon (x1,y1) (x2,y2) ... (xn,yn)
PUT_URL_HERE
This defines a region which is a polygon with vertices (x1,y1), (x2,y2),
through (xn,yn). Clicking in the region goes to the URL specified.
There is a WYSIWYG program available on Athena to make creation
of mapfiles easier. Type:
add cwis
mapedit &
More information about mapedit is available at:
http://web.mit.edu/cwis/docs/mapedit.html
3. The anchor reference is different for web.mit.edu and www.mit.edu.
For imagemaps on www.mit.edu, the anchor format is:
<a href="http://www.mit.edu:8001/img/URL"><img src="IMAGE_URL" ISMAP></a>
Where URL is the URL of the mapfile without the "http://www.mit.edu" part
(for instance, people/username/image.map) and IMAGE_URL is the URL of the
image.
For imagemaps on web.mit.edu, the anchor format is:
<A HREF="http://web-forms.mit.edu/bin/htimage/FULL_AFS_PATH">
<IMG SRC="IMAGE_URL" ISMAP></A>
Where FULL_AFS_PATH is the full afs path of the mapfile (for instance,
afs/athena.mit.edu/user/a/b/abc/www/image.map) and IMAGE_URL is the
URL of the image.
More information about imagemaps on www.mit.edu is available at:
http://www.mit.edu:8001/html/howtomap.html
Information about imagemaps on web.mit.edu can be found at:
http://web.mit.edu/cwis/docs/ismap-doc.html
Last Updated: 8/1/96
|