How to link my svg images (raphael.js)

I created an interactive map using raphael.js after the Jonathan Petitcolas Guide .

The only part he misses is creating links inside the map. I would like to set a goal for each part of the map, for examplehref="example.html"

Although, how can I add datato my single paths with which I can target using jQuery? I want to create a mouse overlay containing information such as north west, southetc.

JSFIDDLE DEMO - I appreciate every hint!

+4
source share
1 answer

regions , title href:

regions["yw-arnsberg"] = {href:"www.google.com", title: "mytitle", path: map.path("M 314.3,204.1c2.6-0.9,...")};

for (function (region) { , :

region.path.attr({title: region.title});

click, href:

region.path[0].addEventListener("click", function() {
    location.href = region.href;         
}, true);

() : http://jsfiddle.net/zbr2rshe/4/ JSFiddle location.href = region.href; .

+3

All Articles