I'm using jvectormap to show the locations of alumni related to the business I work with. Is there a solution to add links to markers? By that I mean for each individual marker, I am aware you can use this code to link all markers to one URL (as an example):
onMarkerClick: function (event, code){
var url = "http://www.google.com";
$(location).attr('href',url);
},
I've arranged my markers like this: "US": {latLng: [38.90, -98.45], name: 'United States of America'}
, if this makes any difference.
I'm looking to use a unique URL for each marker. So USA links to a page dedicated for the USA for example. Currently I am able to link all markers to a single URL using the above code, it's when I try doing more than one country that I run into issues.
Thanks in advance,
Tom.
You can do this
Example is here: http://jvectormap.com/examples/regions-selection/
In your marker add the URL:
then when you have your function:
markers being your array of markers.