Peter Murray-Rust, whose material I have adapted, and who burnt midnight oil to make my first map work for me.
Alan Mills for nagging me to write it down.
Because they are a good way of displaying increasing degrees of complexity e.g. the cell structure stuff on the course.
Because they provide a pictorial way of organising information so that you can find the relevant parts quickly, like the clickable UK map at UC Dept of Computer Science.
Thanks to Peter M-R for allowing me to adapt his text for this section.
e.g. if you click at 20,30 the URL might be something like :
http://www.bbk.somewhere /cgi-bin/imagemap/mymap?20,30
So we have the coordinates appended to a URL [N.B. This URL is an instruction to run the program imagemap (see below) - the cgi-bin and ? are clues].
The "mymap" comes from the HTML, and tells the server the name of the map file.
the HTML looks something like this:
< a href="http://eday.cryst.bbk.ac.uk:8079/cgi-bin/imagemap/mymap">
< img src="mymap.gif" ISMAP> < /A>
Note the ISMAP tag in
< img src="mymap.gif" ISMAP>
Step 2. The server decodes the URL. It finds the name of the .map file(mymap) and the coordinates (20,30).
Step 3.The server starts imagemap, a program in $SERVERROOT/cgi-bin, and passes it the map name and the coordinates.
[This might, on some servers, be in something like /htbin. So long as your Webmaster has all this fixed you don't need to know]
Step 4. imagemap locates the map file by reading a file imagemap.conf, which manages all the map files for that server, and contains a list of .map file names.
You have to be root to edit imagemap.conf . This is the bit where you need the Webmaster.
Step 5. imagemap finds which area was clicked.
[If you miss all the areas, it will look for a default .html file, usually default.html. This is obligatory with some servers, and good practice anyway.It usually contains a simple message about "you hit the background". Mapedit prompts for its location.]
[Question - why shouldn't the default file include a huge fancy image?!!]
Step 6. Then the URL for the area is passed back to the server.
Step 7. Then the server passes the URL to the client in the format:
Location: URL_returned_by_imagemap
Step 8. The client reacts to Location: and retrieves the URL in normal
fashion.
These don't have to cover the whole area; conversely they can overlap, with the priorities being determined by the order of regions in the .map file. You need one of these for each image.
A default file is also defined,for when you click somewhere that isn't inside a marked-up area. Normally this is a background, and should be linked to a .html file which includes a small message like "You selected the background"!
Otherwise there are some tools to help with marking up:
mapedit runs on unix machines and pc's, and we have copies of both versions at BBK.
This is not freeware, but educational establishments are only meant to send Thomas Boutell a postcard......
Both will allow you to draw round an area and link this to files or URLs on your system or elsewhere.
the HTML looks something like this:
< a href="http://www.cryst.bbk.ac.uk/cgi-bin/htimage/mymap.conf">
< img src="mymap.gif" ISMAP> < /A>
Ask your Webmaster for the proper path for the server you want to use.
rect (54,38) (162,63) click1.html
rect (219,10) (251,60) click2.html
rect click1.html 54,38 162,63
rect click2.html 219,10 251,60
The .html
The .gif with the areas marked by mapedit
Here is a picture of the mapedit screen.
(you can also get to this from the map URL)
The .conf file
Here is the .conf file.
E-mail: ubcg09j@mail.cryst.bbk.ac.uk