1 // small helper method to format the hover labels
2 function event_count_summary(hash) {
6 if(total == 0) { summary += "<hr/>"; }
7 summary += "<b>" + type + "</b>: " + (hash[type] ? hash[type] : 0) + "<br/>";
11 summary += "<hr/><b>total</b>: " + total + " events";
16 $('#world-map').vectorMap({
20 fill: markersrc_color.fill,
21 stroke: markersrc_color.stroke,
28 scale: [ '#FFFFFF', '#0071A4' ],
30 normalizeFunction: 'linear',
34 onRegionLabelShow: function(ev, label, code) {
35 label.html("<big>" + label.html() + "</big>");
36 label.append(event_count_summary(regionhits[code]));
38 onMarkerLabelShow: function(ev, label, code) {
39 label.html(markercaptions[code]);
40 label.append(event_count_summary(markerhits[code]));
43 var mapobj = $('#world-map').vectorMap('get', 'mapObject');
44 mapobj.regions['US'].config.name = "USA";