Laura’s Travel Map

https://maps.googleapis.com/maps/api/js?key=AIzaSyD8Tb4_WFkvT3ajLdTd_b4UqiNKsjNTJyMhttps://www.gstatic.com/charts/loader.js
https://www.google.com/jsapi
google.charts.load(’42’, {‘packages’:[‘geochart’]});
google.charts.setOnLoadCallback(drawVisualization);
function drawVisualization() {var data = new google.visualization.DataTable();
data.addColumn(‘string’, ‘Country’);
data.addColumn(‘number’, ‘Value’);
data.addColumn({type:’string’, role:’tooltip’});var ivalue = new Array();
data.addRows([[{v:’FR’,f:’France’},0,’May 2012′]]);
ivalue[‘FR’] = ”;
data.addRows([[{v:’TT’,f:’Trinidad and Tobago’},1,’click to view posts’]]);
ivalue[‘TT’] = ‘http://www.laurelandfern.com/laurelandfern/trinidad-and-tobago-2014.html’;
var options = {
backgroundColor: {fill:’#FFFFFF’,stroke:’#FFFFFF’ ,strokeWidth:0 },
colorAxis: {minValue: 0, maxValue: 1, colors: [‘#9DF2CE’,’#9DF2CE’]},
legend: ‘none’,
datalessRegionColor: ‘#f5f5f5’,
displayMode: ‘regions’,
enableRegionInteractivity: ‘true’,
resolution: ‘countries’,
sizeAxis: {minValue: 1, maxValue:1,minSize:10, maxSize: 10},
region:’world’,
keepAspectRatio: true,
width:null,
height:null,
tooltip: {textStyle: {color: ‘#444444′}, trigger:’focus’, isHtml: false}
};
var chart = new google.visualization.GeoChart(document.getElementById(‘visualization’));
google.visualization.events.addListener(chart, ‘select’, function() {
var selection = chart.getSelection();
if (selection.length == 1) {
var selectedRow = selection[0].row;
var selectedRegion = data.getValue(selectedRow, 0);
if(ivalue[selectedRegion] != ”) { window.open(ivalue[selectedRegion]); }
}
});
chart.draw(data, options);
}
window.onresize = function(event) {
drawVisualization();
};