Skip to content
Snippets Groups Projects
Commit d1f7464b authored by Winnie's avatar Winnie
Browse files

Updates

- Broken
parent aa47a2f9
No related branches found
No related tags found
No related merge requests found
...@@ -13,34 +13,34 @@ function initInfo(lati, longi,name, date, count ) { ...@@ -13,34 +13,34 @@ function initInfo(lati, longi,name, date, count ) {
}); });
console.log("Gened info map"); console.log("Gened info map");
for(var i=0; i < lati.length; i++){
console.log("Trying to plot");
// Set info window contents to input string // Set info window contents to input string
var contentString = '<div id=“content”>'+
'<div id=“siteNotice”>'+ var infowindow = new google.maps.InfoWindow();
'</div>'+ var marker, i;
'<h1 id=“firstHeading” class=“firstHeading”>' + name[i] + '</h1>'+ for (i = 0; i < lati.length; i++) {
'<div id=“bodyContent”>'+ marker = new google.maps.Marker({
'<p><b>Name: </b>' + name[i] + '</p>'+ position: new google.maps.LatLng(lati[i], longi[i]),
'<p><b>Date: </b>' + findMonth(date[i].month) + ' ' + date[i].day + ', ' + date[i].year + '</p>'+ map: map
'<p><b>Count: </b>' + count[i] + '</p>'+ });
'</div>'+
'</div>';
var infowindow = new google.maps.InfoWindow({ google.maps.event.addListener(marker, 'click', (function (marker, i) {
content: contentString return function () {
}); infowindow.setContent('<div id=“content”>' +
'<div id=“siteNotice”>' +
// Plot points '</div>' +
// var marker = new google.maps.Marker({ '<h1 id=“firstHeading” class=“firstHeading”>' + name[i] + '</h1>' +
// position: {lat: lati[i], lng: longi[i]} , '<div id=“bodyContent”>' +
// map: map, '<p><b>Name: </b>' + name[i] + '</p>' +
// }); '<p><b>Date: </b>' + findMonth(date[i].month) + ' ' + date[i].day + ', ' + date[i].year + '</p>' +
google.maps.event.addListener('click', function(marker) { '<p><b>Count: </b>' + count[i] + '</p>' +
return function(){ '</div>' +
'</div>');
infowindow.open(map, marker); infowindow.open(map, marker);
} }
})(marker, i));
});
console.log("Plotted" + i + " markers"); console.log("Plotted" + i + " markers");
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment