by John Criswick, The Internet Conveyor Ltd. Updated: November 28, 1996
Nevertheless, many users still are not employing a Java capable browser! So you need to provide at least one other non-applet solution (e.g. a definition of a client side image map) if you choose to use one of these image map applets.
Compare the following two imagemaps: the first is implemented in Java, the second is the "sercer side" way of implementing an imagemap. To compare them, I have set up links so that the right and left arrows for each imagemap will take you to a different but same sized page. Only these two parts ofd the image map are active. Also, compare the status feedback that you see as you move your mouse over each image.
MapApps use the same format as the NCSA server-side image map definition file, so it is a simple matter to get these applets working if you already have a server side image map working!
Using Server side Imagemaps:
User Feedback
Increased download time and increased traffic on server
Two MapApps are currently available. MapApp1 provides the minimum functionality in the
series. MapApp2 adds the ability for the user to see the "hot areas" by pressing on any
key (while the mouse is over the imagemap).
To minimize the size of the applet I have excluded error messages and made a few
restrictions on how the imagemap data is read in. In order to debug your imagemap
layout, just use MapApp2 to let you see the hot region layout.
MapApps use the same map layout as for the imagemap script used by NCSA's httpd server
(as explained here).
So you hopefully will not need to redo this map file, but just to copy it to a new location.
The main interface enhancements of MapApp1 over the server side image maps are:
MapApp1: (7,719 bytes)
Applet Tag Usage for MapApp1:
The applet tag for the above applet looks something like:
To download the class file either download the raw class file or a compressed
archive file. Once you have the class file on your site, make sure it is the
same size as specified here:
The raw file:
MapApp2 is the same as MapApp1 but with additional code to help the user find the hot
areas. To see the hot areas put the mouse over the imagemap and press any key.
MapApp2: (9,880 bytes)
Applet Tag Usage for MapApp2:
The usage is the same as MapApp1 except that you are allowed to specify the colour
of the highlighted hot areas (you can use either spelling of colour or color). Valid
colours are: black, gray, darkgray, lightgray, blue, cyan, magenta, green, yellow,
orange, red, pink and white.
The raw file:
See this reference at NCSA for more information on setting up the map file. There are some additional restrictions and flexibilities however:
Restrictions:
As MapApps are Freeware, no warrantee is implied here in any sense. Therefore use them at your
own risk, if any! But feel free to send me your URL
so I can check out how you used it!
Copyright 1995, 1996 The Internet Conveyor Ltd.
JavaTM Imagemap Pros and Cons
Pros: (advantages)
No default method required
Usable on CDROM and in standalone applications
Improved security and reduced CPU overhead on server
Usage of Java Enabled Browsers
Downloading and Using MapApps
Intro...
MapApp1:
<applet code="MapApp1.class" width=279 height=32>
<param name=image value="samplemap.gif">
<param name=map value="samplemap.mpp">
</applet>
Notes:
Compressed archives of the class file and this instruction file:
MapApp2: <param name=colour value=green>
To download the class file either download the raw class file or a compressed
archive file. Once you have the class file on your site, make sure it is the
same size as specified here:
Compressed archives of the class file and this instruction file:
Image Map Layout File:
Flexibilities:24,45 23, 55
Note: any errors encountered in the layout of a method (rect, poly etc.) will result in it
being ignored. Therefore I recommend using the feature in MapApp2 of holding the key down to
verify your layout.
MapApp Update List and Comments
To receive notification of updates and additions to the MapApp library send mail to
mapapps@conveyor.com with
subscribe mapapps in the subject of the message. Send comments, URLs and requests for features
or bug reports to John Criswick at
criswick@conveyor.com.