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?
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 ?
You can download the demo, update the offsetX/Y, and try it out directly.
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: