Image Mapping Feature


The image mapping feature of Web Server/400 allows a user to map parts of an image to documents. When the user clicks on different areas of the image with the browser, the user will be redirected to a document appropriate to that part of the image.

When describing the areas of the image, you can use shapes such as circles, polygons and rectangles. A user can also specify points, with the nearest point being used to pick a document. A default can be specified, which is used when no other match is made.

Including a Mapped Image

To include a mapped image, include a reference like the one below:

   <A HREF="/qsys/webcgi/imagemap/MapFile"> <IMG SRC="picture.gif"
    ISMAP> </A>

The example above has the following parts

qsys
An alias into *QSYS.
webcgi
A script library (see configuration issues below).
MapFile
The name of the image map mapping file.
picture.gif
An image the user can click on.

Configuration Issues

In addition to building a map file (above), you must set up a global image map configuration file, and set up an alias into QSYS, as well as enable scripts correctly.

To support the above example, an alias entry that redirects QSYS into the root of *QSYS is required. Also see more about aliases in general.

Image mapping is supported as a pseudo-script that must be specified in a script library entry and enable scripts must be set to Yes. In the above example, webcgi would need to be listed as a script library.

Using Your Own Image Mapping

You may write your own image mapping support as a script and reference it as above. The image mapping support provided with Web Server/400 is written as a pseudo-script and if the server sees a script in the referenced library, it will be executed instead of the shipped image mapping feature.