Image maps for dynamic images

H

hemarangain

Can we create an image map for a dynamically generated JPEG image.
example: My program generates a bar chart as a JPEG image. I want to
link the bars of the chart to screens displaying corresponding data.
 
A

Alex Hunsley

Can we create an image map for a dynamically generated JPEG image.
example: My program generates a bar chart as a JPEG image. I want to
link the bars of the chart to screens displaying corresponding data.

Define "my program" - a web app? Surely that's what you mean, since
image maps usually imply HTML/web is being used...
 
D

dscottarnold

Can we create an image map for a dynamically generated JPEG image.
example: My program generates a bar chart as a JPEG image. I want to
link the bars of the chart to screens displaying corresponding data.


Not sure if cost is a factor but check out http://www.corda.com/
products/popchart/

We use that on our servers to create graphs/charts and I believe you
can have links for data points.
Hope that helps
 
L

Lew

Alex said:
Define "my program" - a web app? Surely that's what you mean, since
image maps usually imply HTML/web is being used...

Assuming that's true, you define a standard map element in the JSP:
(untested)

<img src="Display?image=${image}" usemap="barlinks" ... />
<map name="barlinks">
<c:forEach var="barloc" items="${imagebars}" >
<area href="${barloc.href}" coords="${barloc.coords}" />
</c:forEach>
</map>

Display would be a servlet that streams the jpeg to response.out.

- Lew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top