This document describes how to convert a server-side image map file into a client-side image map file.
Server-side image maps are normally stored in a standard ASCII text file. There are 2 common formats for the map files, NCSA (Netscape) and CERN. Each format associates active areas of an image (hot spots) with a URL.
rect http://www.foo/bar.html 7,15 9, 20
rect (7,15) (9,20) http://www.foo/bar.html
(Note that the URL and coordinate parameters
are reversed from the NSCA format.)rect (7,15) 20
http://www.foo/bar.html
circle http://www.foo/bar.html 7,15 9, 20
circle http://www.foo/bar.html (7,15) 17
Client-side image maps are described in HTML code using the 'AREA
'
element. AREA elements have the 3 attributes, SHAPE
, COORDS
and HREF
,
that correspond to the shape, coordinates and URL parameters of the server-side
image map. Example:
<area shape="POLY" coords="185,0,355,0,295" href="education.html" alt="Education" />
MAP
start element to the client-side image map
fileAREA
elements for the client-side image map with the
SHAPE, COORDS
and HREF
attributes set to the shape, coordinates and URL
values.MAP
end element to the client-side image map
file# testmap rectangle (5,9) (110,43) http://www.yahoo.com/ polygon (111,9) (220,43) http://www.infoseek.com/ circle (415,77) 16 http://www.connpad.com/toolbox.htm
<map name="testmap.map"> <area shape="rect" coords="5,9,110,43" href="http://www.yahoo.com/" /> <area shape="poly" coords="111,9,220,43" href="http://www.infoseek.com/" /> <area shape="circle" coords="415,77,16" href="http://www.connpad.com/toolbox.htm" /> </map>
Written by Chris
Ridpath
Jan. 18, 2001