S.B.C.C. -> Computer Science -> Courses -> COMSC 111 -> Class Notes


Image Maps

Preliminaries

Denote Image as Imagemap

<IMG SRC="image.gif" USEMAP="img_maps.html#demobar">

Create Coordinate Map

Precedence is in displayed order.

<MAP NAME="demobar">
<AREA SHAPE="RECT" COORDS= "24,18,143,41" HREF="smartmap/previous.html">
<AREA SHAPE="RECT" COORDS= "168,18,287,41" HREF="smartmap/next.html">
</MAP>

A few shapes are supported

<AREA SHAPE=RECT COORDS = "left-x, top-y , right-x, bottom-y" HREF = "URL" >
<AREA SHAPE=CIRCLE COORDS = "center-x , center-y , radius-x" HREF = "URL" >
<AREA SHAPE=POLY COORDS = "x1,y1 , x2,y2 , x3,y3 , ..." HREF = "URL" >

Supporting both

To support both, just put the special HREF link in place. Add ISMAP option to IMG tag.

<A HREF="http://www.spyglass.com/maps/test.map">
<IMG SRC="test.gif" USEMAP="#test" ISMAP>
</A>


Last Updated: February 19, 1998
Author: Dean Nevins <dn@picard.sbcc.cc.ca.us>