Javascript Tooltip / Posts /

Hotspots on a map

I’m using your tooltip code to pop up information on several location hotspots on a map. The tooltip seems not recognize the location of the hotspots and pops up from unexpected locations. Do you know how to fix this issue?
Jim  11 years ago   viewed: 10053    

3 Answers

I don't have the case of Map, and I tried the option relativeTo: "mouse" in the script, but failed.
would you please give me a clean sample, that the offsetX and offsetY are working ?
  10 years ago
You can download the demo, update the offsetX/Y, and try it out directly.
Milo   10 years ago
The root cause of your issue is that the this keyword within your tooltip.pop(this, ...) is referring to the whole <map name="Map" id="Map"> other than the dot element, and the tooltip gets lost in finding the size and position of the map element.

I think you can fix this issue by setting the script's option as:
var tooltipOptions=
    relativeTo: "mouse",
milo   11 years ago


Your name*
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: