Link to USGS home page
Internal USGS Access Only

Implementing Image Maps

Both types of imagemaps use Cartesian coordinates (x,y) to map an image. The origin (0,0) is at the upper left corner of the image, and the coordinates are in pixels from the origin..

Three shapes are used to define the mapped areas in an imagemap:

Circle
For Client-Side: defined by center (x,y) and radius length
For Server-Side: defined by center (x,y) and (x,y) on edge of circle
Rectangle
top left and bottom right (x,y)
Polygon
any shape defined by up to 100 (x,y) points

In the case of overlaps, the first shape specified takes priority. Think of later entries as being inserted underneath existing entires.

It is also possible to define holes in existing shapes so that whatever is underneath is exposed.

In addition, it is possible to specify a default hyperlink for clicks registered outside of defined "hot spots".

slide 29


[up]
"Mastering a Web Site" online course
Created and maintained by Lorna Schmid and David Boldt.
http://water.usgs.gov/usgs/training/webmaster/image_maps2.html    
Last modified: Wed Nov 12 17:57:18 EST 2003