NCSA's HTTPD has a special directory called cgi-bin in which you can put commands you want to be accessible by the server. One of the pre-supplied commands is imagemap, which is a much more sophisticated active map facility.
If we had the following lines of HTML in a document
<img src=uk_map.gif ISMAP>
then when the user clicked on at (say) point (404,451), the client would submit a GET request to the server:
This calls the imagemap script in cgi-bin with two pieces of information - the QUERY_STRING environment variable with a value of ``404,451'' and the PATH_TRANSLATED environment variable with a value such as
`` /www/htdocs/uk_map'' (where `` /www/htdocs'' is the root of the server's document tree).
HTTPD has a configuration directory called `` conf'' which contains all the server configuration files. Imagemap looks in this directory for a file called imagemap.conf.
In our particular case (we have a few image maps set up), this configuration
file looks like:
Imagemap reads this file, and looks for `` uk_map'', which it finds
associated with the file `` /www/conf/uk.map''. It then reads from `` /www/conf/uk.map'', of which the first few entries look like:
circle http://www.cs.ucl.ac.uk/misc/uk/london.html 416 451 396 458
circle http://www.cs.ucl.ac.uk/misc/uk/canterbury.html 442 463 428 459
circle http://www.cs.ucl.ac.uk/misc/uk/cambridge.html 413 405 400 407
circle http://www.cs.ucl.ac.uk/misc/uk/bradford.html 337 312 341 311
rect http://www.cs.ucl.ac.uk/misc/uk/bradford.html 335 317 372 325
rect http://www.cs.ucl.ac.uk/misc/uk/birmingham.html 335 387 394 397
Each of these lines describes an active area of the map and the URL associated with that area (lines beginning with a `` #'' are comments).
The first entry on a line describes the shape of the active area. The second entry is the URL to redirect the client to if the user clicks within this area. The last arguments give the coordinates of the shape. The meaning of the coordinates is as follows: