There are two ways of doing image maps. The first one shown below is more efficient, but does not use the same format as the standard Unix servers. The second example is "plug-compatible" with a Unix server.
In either case, all imagemaps need need to have three files. The first is the HTML wrapper (which is the file you're reading now). The other two are pointed to out of the HTML wrapper: one is the imagemap file (which has an extension of .imagemap) and one is the presentation graphic, typically a .GIF file (although you could use JPEG if you didn't care about Mosaic users).
The imagemap file is in CERN format. Any map program should be able to put that format out (the other possibility is NCSA, which is functionally equivalent but has a very different syntax). If you want to find out more about the CERN format from the WWW consortium, click here.
The biggest gotcha we've found is that people sometimes to fully qualify their URLs in an imagemap. You must do this, because the client has insufficient context to fill in a relative URL with perfect results. If you look at the example .IMAGEMAP file, you see that we have left off the scheme and host address, but have otherwise used a fully qualified URL, from the "root," /
Use View Source... to see the .HTML file (this file). If you want to copy the actual HTML and Imagemap, DISK$EBONY:[HTTPD.WWW.DEMO]IMAGEMAP.HTML and DISK$EBONY:[HTTPD.WWW.DEMO]IMAGEMAP.IMAGEMAP.
The image below is mapped using the ISMAP option. The anchor that this image belongs will translate to a script execution that links portions of the image to other anchors in the text. The /$mapimage/ HREF reference in the image anchor invokes a special builtin imagemap handling by the server. The presentation method demo uses the WWWEXEC script.
default URL
circle (x,y) r URL
rectangle (x1,y1) (x2,y2)
URL
polygon (x1,y1) (x2,y2) ...
(xn,yn) URLhtimage.
So first point is added also as the last one if necessary.
def, circ, rect, poly.
Shapes are checked in the order they appear in config file, and the
URL corresponding to the first match is returned. If none match, the
default URL is returned.
URLs are
Updated 10-July-1996