Image Map Plugin
With this Plugin for JSPWiki you can use [Google:Image Map Tutorial Image Maps] on your pages in a very easy way. The plugin can be used the same way like the normal [JSPWiki:Image ImagePlugin]. The map points and links can be edited by a simple web based wizard, or you can type the map points in the plugin text.
If you click on the edit-link at the right bottom corner of the picture, you will jump to the image map wizard, just try it.
Example
- 151;253;20
- 247;323;20
Test;166;277;20
- 63;104;20
test;217;185;20 hello;22;329;20 CityDortmund;62;152;20 cool place;88;310;20 name;109;122;20 dfgdfgfdgdsfs;87;93;20 foo;112;37;20 aap;147;197;20 CityDortmund;108;106;20 Aus;11;161;20 FGGF;191;60;20
- 43;65;20
a;172;287;20 werner;115;124;20 CityDortmund;163;140;20 one;107;115;20 testre;34;40;20 help;218;352;20 help;218;352;20 Dortmund;220;112;20 CityDortmund;0;0;20 Test;61;331;20 Dortmund;227;141;20 bayern;172;285;20 kaushal;238;237;20 as;204;123;20 fdfs;183;181;20 cccc;87;93;20
- 186;61;20
http://google.es;150;248;20 CityDortmund ;214;29;20 }]
Die Attribute 'image', 'symbols' und 'fonts' sind im imagemap-Tag erforderlich.
is created by the following plugin definition:
<code>
[{ImageMap image='deutschland.gif'
NordrheinWestfalen;50;170;20
http://www.berlin.de;217;115;20
http://www.bayern.de;165;273;20
http://www.hessen.de;91;204;20
}]
</code>
ImageMap-Plugin-Parameters
| Name | Description | Necessity |
|---|---|---|
| image | URL or attachment name of the image | required |
| align | center, left, right | optional (none) |
| width | size of the image | optional |
| height | size of the image | optional |
It is important that the plugin text has a body part, that is the text after the blank line under the ImageMap definition. Here the wizard stores the link and point parameters in the form link;x;y;r. So an empty ImageMap must have a blank line before the closing brakets.
By default a circle with radius r is used. Link can be any wiki link. You can specify other shapes like link;polygon;x1;y1;x2;y2;...;xn;yn; or link;rect;x1;y1;x2;y2; but at the moment the wizard just creates circle shapes with radius 20. Other shapes are working but must be edited by hand in the page text for the time beeing.
Installation
1. The following jars must be copied to {JSPWiki}/WEB-INF/lib:
2. The following must be added to {JSPWiki}/WEB-INF/web.xml:
<code>
<servlet>
<servlet-name>ImageMapServlet</servlet-name>
<servlet-class>
com.ecyrd.jspwiki.plugin.ImageMapServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ImageMapServlet</servlet-name>
<url-pattern>/ImageMapServlet</url-pattern>
</servlet-mapping>
</code>
Known Bugs
- The Referenced By tag does not recognize ImageMap links.
- The old plugin syntax
<code>[{INSERT .... WITH param}]</code>is not supported by the wizard.
Source Code
The source code is part of the SBaltesPlugins.jar.
License
ImageMapPlugin a JspWiki Plugin for using html image maps. Copyright (C) 2004 Sebastian Baltes
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
GNU LESSER GENERAL PUBLIC LICENSE Version 2.1