I have successfully implemented an SVG map showing marked locations and polygons, with CSS styling that makes the areas stand out on hover. I achieved this without using any JavaScript code.
My next goal is to create a hovering window or tooltip that displays text whenever the mouse hovers over a specific area on the map. The challenge is to have this window appear precisely over the correct location on the map as well.
I am seeking suggestions for the simplest way to accomplish this task. For reference, you can view the SVG map here.
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1600 1175" enable-background="new 0 0 1600 1175" xml:space="preserve">
<g id="Layer_1">
...
</g>
<g id="Capitals_1_">
<g id="Capitals">
... (list of capital cities on the map)
</g>
</g>
</svg>