Yawn - imagemap support


bla bla bla

This is a test of imagemap support. Yawn supports clickable maps internally. A built-in function retrieves requested document after receiving the co-ordinates of the point in the image clicked by the user. In order for the client to send them to the server, the <IMG> tag must have the ISMAP attribute on it, and it must be a link to a .map file. No special directory on the system is needed for the .map files, so that any user can link a map at any place, without bothering the system administrator. The files use the format of NCSA imagemaps. Note: the default location must be the last one in the map file.

The test map used above reads:

base_uri referer
circle examples/map/circle.htm 59,49 95,82
poly examples/map/poly.htm 108,91 134,44 191,31 216,64 279,27 278,88 278,92
rect examples/map/rectang.htm 290,3 381,94
default examples/map/default.htm

You can also specify points on the map file, instead of areas. The effect is that the location described by the point that is nearest to the clicked pixel is used by the server. This is also a way to specify the default location for clicks outside areas. If you add a point definition to the above map, outside the defined shapes, it will be always used for clicks outside of the shapes, taking priority over the default location. Check the following map - the nearest point wins.

The test map used above reads:

base_uri referer
point examples/map/point1.htm 28,20
point examples/map/point2.htm 87,82
point examples/map/point3.htm 203,24
point examples/map/point4.htm 287,81
point examples/map/point5.htm 369,22

In the map file, the first line should specify the context for the resolving of URLs given in the rest of the map. If you're using an imagemap editor, remember to place the directive in the file manually after you've finished editing. It allows you to choose from "base_uri map", which means URLs in the map file are traeted as relative to the place where the map file is located, or " base_uri referer", which means they will be relative to the location of the file containing the ISMAP attribute. The deafult is "map". You can also point the map file to another site by specyfying the URL as " base_uri http://another.site/".


[Home - Overview - Downloading - Installation - Configuration -
Implementation notes - License - Registering - Contacts]