Skip to content
Snippets Groups Projects
Commit 62a80a9c authored by Ray Liu's avatar Ray Liu
Browse files

Minor fix on cluster.js

parent 191dd4a7
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
// Displays markers on a map centred at the Laurentian Great Lakes
// When the user clicks the marker, an info window opens
var openWindow;
var openCWindow;
function initCluster(lati, longi,n, individualCount) {
// Generate map centred at Great Lakes
......@@ -31,10 +31,10 @@ function setCluster(map, lati, longi,n, individualCount) {
google.maps.event.addListener(marker,'click', (function(marker,content,infowindow){
return function() {
console.log("Clicked!!!!");
if (openWindow)
openWindow.close();
if (openCWindow)
openCWindow.close();
infowindow.setContent(content);
openWindow = infowindow;
openCWindow = infowindow;
infowindow.open(map,marker);
};
})(marker,content,infowindow));
......
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