Using JQV Maps from http://jqvmap.com/ and have this code (see below) to link a region to a page URL link.
jQuery('#africa-map').vectorMap({
map: 'africa_en',
backgroundColor: '#D1EEEE',
color: '#c9dfaf',
hoverColor: '#999999',
showTooltip: true,
selectedColor: '#9CBA7F',
multiSelectRegion: true,
selectedRegions: ['AO', 'ZA', 'MG', 'NA', 'ZW', 'ZM', 'UG', 'TZ', 'KE', 'RW', 'MW', 'MZ', 'BW'],
onRegionClick: function (event, code, region) {
switch (code) {
case "AO":
window.location.replace("http://www.google.com");
break;
case "ZA":
window.location.replace("http://www.yahoo.com");
break;
case "MG":
window.location.replace("http://www.bing.com");
break;
}
// tells the click where to go -> window.location = "http://www.google.com/";
}
});
However this is not working. What is the error? Console log error say regionClickEvent is not defined
so what do I do to define it?