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
<a href=/cgi-bin/imagemap/uk_map>
<img src=uk_map.gif ISMAP>
</a>
then when the user clicked on at (say) point (404,451), the client would submit a GET request to the server:
GET /cgi-bin/imagemap/uk_map?404,451
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:
lon_map:/www/conf/london.map
uk_map:/www/conf/uk.map
Worldmap:/www/htdocs/BBC/wrldserv/maps/World_map_image.map
Samerica:/www/htdocs/BBC/wrldserv/maps/Samerica.map
Africa:/www/htdocs/BBC/wrldserv/maps/Africa.map
Central_Asia:/www/htdocs/BBC/wrldserv/maps/Central_Asia.map
Asia:/www/htdocs//BBC/wrldserv/maps/Asia.map
Middle_East:/www/htdocs/BBC/wrldserv/maps/Middle_East.map
Europe:/www/htdocs/BBC/wrldserv/maps/Europe.map
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:
default http://www.cs.ucl.ac.uk/misc/uk/intro.html#map
#London
circle http://www.cs.ucl.ac.uk/misc/uk/london.html 416 451 396 458
#Canterbury
circle http://www.cs.ucl.ac.uk/misc/uk/canterbury.html 442 463 428 459
#Cambridge
circle http://www.cs.ucl.ac.uk/misc/uk/cambridge.html 413 405 400 407
#Bradford
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
#Birmingham
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: