‘,//content for information window

‘,//content for information window
disableAutoPan: false,
maxWidth: 0,
pixelOffset: new google.maps.Size(-250, -400),
zIndex: null,
closeBoxURL: «https://foodpages.ca/h/img/close-map.png»,
infoBoxClearance: new google.maps.Size(1, 1),
position: new google.maps.LatLng(location[0], location[1]),
isHidden: false,
pane: «floatPane»,
enableEventPropagation: false
};
marker.infobox = new InfoBox(myOptions);
marker.infobox.isOpen = false;

//setting marker data
var myOptions = {
draggable: true,
content: ‘

‘,
disableAutoPan: true,
pixelOffset: new google.maps.Size(-21, -58),
position: new google.maps.LatLng(location[0], location[1]),
closeBoxURL: «»,
isHidden: false,
pane: «floatPane»,
enableEventPropagation: false
};
marker.marker = new InfoBox(myOptions);
marker.marker.isHidden = false;
marker.marker.open(map, marker);
markers.push(marker);
google.maps.event.addListener(marker, «click», function (e) {
var curMarker = this;
jQuery.each(markers, function (index, marker) {
// if marker is not the clicked marker, close the marker
if (marker !== curMarker) {
marker.infobox.close();
marker.infobox.isOpen = false;
}
});

if(curMarker.infobox.isOpen === false) {
curMarker.infobox.open(map, this);
curMarker.infobox.isOpen = true;
map.panTo(this.position);
} else {
curMarker.infobox.close();
curMarker.infobox.isOpen = false;
}

});

});

var triangleCoords = [
new google.maps.LatLng(43.156901, -79.157699),
new google.maps.LatLng(43.161326, -79.162753),
new google.maps.LatLng(43.161326, -79.162753),
new google.maps.LatLng(43.161288, -79.170323),
new google.maps.LatLng(43.156502, -79.1704),
new google.maps.LatLng(43.154112, -79.167896),
new google.maps.LatLng(43.152163, -79.165105),
new google.maps.LatLng(43.156901, -79.157699)
];

// Construct the polygon
bermudaTriangle = new google.maps.Polygon({
paths: triangleCoords,
strokeColor: ‘#FF0000’,
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: ‘#FF0000’,
fillOpacity: 0.35
});

bermudaTriangle.setMap(map);

var styleArray =
[{«featureType»:»water»,»stylers»:[{«color»:»#19a0d8″}]},{«featureType»:»administrative»,»elementType»:»labels.text.stroke»,»stylers»:[{«color»:»#ffffff»},{«weight»:6}]},{«featureType»:»administrative»,»elementType»:»labels.text.fill»,»stylers»:[{«color»:»#e85113″}]},{«featureType»:»road.highway»,»elementType»:»geometry.stroke»,»stylers»:[{«color»:»#efe9e4″},{«lightness»:-40}]},{«featureType»:»road.arterial»,»elementType»:»geometry.stroke»,»stylers»:[{«color»:»#efe9e4″},{«lightness»:-20}]},{«featureType»:»road»,»elementType»:»labels.text.stroke»,»stylers»:[{«lightness»:100}]},{«featureType»:»road»,»elementType»:»labels.text.fill»,»stylers»:[{«lightness»:-100}]},{«featureType»:»road.highway»,»elementType»:»labels.icon»},{«featureType»:»landscape»,»elementType»:»labels»,»stylers»:[{«visibility»:»off»}]},{«featureType»:»landscape»,»stylers»:[{«lightness»:20},{«color»:»#efe9e4″}]},{«featureType»:»landscape.man_made»,»stylers»:[{«visibility»:»off»}]},{«featureType»:»water»,»elementType»:»labels.text.stroke»,»stylers»:[{«lightness»:100}]},{«featureType»:»water»,»elementType»:»labels.text.fill»,»stylers»:[{«lightness»:-100}]},{«featureType»:»poi»,»elementType»:»labels.text.fill»,»stylers»:[{«hue»:»#11ff00″}]},{«featureType»:»poi»,»elementType»:»labels.text.stroke»,»stylers»:[{«lightness»:100}]},{«featureType»:»poi»,»elementType»:»labels.icon»,»stylers»:[{«hue»:»#4cff00″},{«saturation»:58}]},{«featureType»:»poi»,»elementType»:»geometry»,»stylers»:[{«visibility»:»on»},{«color»:»#f0e4d3″}]},{«featureType»:»road.highway»,»elementType»:»geometry.fill»,»stylers»:[{«color»:»#efe9e4″},{«lightness»:-25}]},{«featureType»:»road.arterial»,»elementType»:»geometry.fill»,»stylers»:[{«color»:»#efe9e4″},{«lightness»:-10}]},{«featureType»:»poi»,»elementType»:»labels»,»stylers»:[{«visibility»:»simplified»}]}];
map.setOptions({styles: styleArray});

map.setOptions({styles: styleArray});

var markerCluster = new MarkerClusterer(map, markers,{
styles: [
{
height: 114,
url: ‘https://foodpages.ca/h/img/cluster-bg.png’,
width: 114,
textColor: ‘#333’,

}
]
});

google.maps.event.addListener(map, ‘zoom_changed’, function() {
jQuery.each(markers, function(index, marker) {
marker.infobox.close();
marker.infobox.isOpen = false;
});
});

var previousClusters = new Array();
google.maps.event.addListener(markerCluster, ‘clusteringend’, function(clusterer) {
jQuery.each(previousClusters, function(index, previousCluster) {
previousCluster.cluster.close();
});

previousClusters = new Array();

jQuery.each(clusterer.getClusters(), function(index, currentCluster) {
if (this.getMarkers().length > 1) {

jQuery.each(this.getMarkers(), (function() {
if (this.marker.isHidden == false) {
this.marker.isHidden = true;
this.marker.close();
}
}));

var myOptions = {
draggable: true,
content: ‘

‘,
disableAutoPan: true,
pixelOffset: new google.maps.Size(-21, -21),
position: this.getCenter(),
closeBoxURL: «»,
isHidden: false,
enableEventPropagation: true
};

this.cluster = new InfoBox(myOptions);
this.cluster.open(map, this.marker);
previousClusters.push(this);
} else {
jQuery.each(this.getMarkers(), (function() {
if (this.marker.isHidden == true) {
this.marker.open(map, this);
this.marker.isHidden = false;
}
}));
}
});
});

}
function Map() {
google.maps.event.addDomListener(window, ‘load’, HomepageMap);
}