Javascript Tooltip / Posts /

Hotspots on a map

1
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: 9876    

3 Answers

1
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 ?
nart
  9 years ago
1
You can download the demo, update the offsetX/Y, and try it out directly.
Milo   9 years ago
0
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*
Password
(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: