Create a DTO that describes the image map, something like:
ImageMap
- String: imageUrl (would point to your png-image servlet)
- List<ImageMap.Area>: areas (calculated on server using your lib)
ImageMap.Area:
- ShapeTypeEnum: shape (RECT, CIRCLE, POLY)
- List<Integer>: coords
- String: href
- String: title
Then create a custom widget that can render an image map using <img>, <map> and <area> and use the DTO information to configure the widget.
If your lib creates raw HTML for the image map then you probably only need the imageUrl and the raw HTML in your DTO and render the raw HTML directly using GWT's HTML widget. But you have to do some sanity checks on the raw HTML to prevent cross site scripting attacks.
So if you can, build the HTML on the client side and only transfer the needed data from server to client.
-- J.