The standard structure for an HTML page using client side image maps would be something along the lines of
// Image map specification with name "mapname" <MAP NAME=...> ... specification ... </MAP> // Image tag <img src="..." ISMAP USEMAP="mapname">
This poses an interesting question.
Since we normally call the graphing script directly in the <img> tag how do we get hold of the image map (which is available only in the image script) in this "HTML wrapper" script?
In JpGraph there is actually two ways of solving this.
The first (and preferred) way modifies the stroke method so that instead of returning an image (like the standard Stroke() method) StrokeCSIM() actually returns an HTML page containing both the image map specification and the correct <IMG> tag.
This of course means that it is necessary to treat an image map returning image script differently from a non-CSIM image script, for example you can't use it directly as the target for the "src" attribute of the <IMG> tag since it sends back an actual HTML page containing both an image tag together with an image map.