Position text in top of a dinamically generated map area of type poly

Posted by Guillermo Vasconcelos on Stack Overflow See other posts from Stack Overflow or by Guillermo Vasconcelos
Published on 2010-06-14T16:18:18Z Indexed on 2010/06/14 16:22 UTC
Read the original article Hit count: 328

Filed under:
|
|

Hi,
I have a web page with a dynamically generated image map (from a server side charting tool that I have no control over). I have a value for each area in the title attribute that I want to display on top of the image. I could dynamically generate span elements with absolute positioning, but I'm not sure how to calculate the "center" of a poly shaped area to use as coordinates.
Is there an easy way to create texts for image map areas? a JQuery plug in perhaps?
Do you know a good way to calculate the center of a poly area?
Do you have any other suggestions?
Thanks,
Guillermo

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery