Lawrie's Map Demonstration

This file demonstrates the use of clickable image maps, via several different methods.

Using Client-Side Imagemap

This map resolves the reference by using the map information in this document (but not visible on the browser) if client-side imagemaps are supported, otherwise it uses the internal web server support provided by the apache web server. Client-side imagemaps are only supported by some browsers (including recent versions of Netscape and Explorer).

The map details are included in the HTML document (eg such as this document), but are usually not visible unless you "view source". the map name is provided by the usemap="#mapname" option to the IMG SRC tag. The URL's used can be relative to this file, since the mapping is done by the client, unlike server side maps. The map used in the example below is as follows:

<map name="aus-nz.map">
<area shape="rect" coords="88,53, 117,96" href="map_resp2.html">
<area shape="rect" coords="2,2, 86,74" href="map_resp1.html">
<area shape="rect" coords="0,0, 2048, 2048" href="map_def.html">
</map>
A reference to a client-side imagemap (with fallback to internal server) looks as follows:
<a href="aus-nz.map"><img src="aus-nz.gif" ismap usemap="#aus-nz.map"></a>

eg. Please select somewhere on this image:

Using Internal Server NCSA Map Handler

This map resolves the desired reference by implicitly using the internal web server support for imagemaps. Support for this is provided by the apache web server. It is used by requesting the mapfile with the mouse coords.

The map file referenced must be in NCSA format. Note the target URL's must be either full URL's, or be relative to server root, NOT the current directory, since when the mapping is done, the request is to the map program, NOT this file.

The map file aus-nz.map used in the example below is:

# aus_nz imagemap map file (NCSA)
default /tip/info/map_def.html
rect    /tip/info/map_resp2.html    88,53 117,96
rect    /tip/info/map_resp1.html    2,2 86,74
A reference to an internal imagemap using this file, looks as follows:
<a href="aus-nz.map"><img src="aus-nz.gif" ismap></a>

eg. Please select somewhere on this image:

Using External NCSA Imagemap program

This map resolves the desired reference by explicitly calling the /cgi-bin/imagemap/ program and supplying the mapfile name and the mouse coords. It may used on any web server which supports CGI scripts, with the NCSA imagemap program installed in the central cgi-bin directory.

The map file used must be in NCSA format, and is the same as the example above. A reference to an external imagemap using this file, looks as follows:

<a href="/cgi-bin/imagemap/tip/info/aus-nz.map"><img src="aus-nz.gif" ismap></a>

eg. Please select somewhere on this image:


Lawrie Brown / 28 Oct 96