/****
* IMPORTANT! PLEASE READ!
*
* The informamation contained in this file is the property of Essence Montreal.
* To remain in accordance with this website's Terms and Conditions (the "Terms"),
* you may not, copy, store, reproduce, reuse, sell, redistribute or republish any
* information found on this page or found anywhere else on this website.
*
* The use of any of the information from this page or anywhere else on this website
* for any use outside of the website's functionality is stricly prohibited.
*
* You may review our Terms here:
* https://www.essencemontreal.com/terms.php?l=f *
****/
function mapload() {
var latlng = new google.maps.LatLng(45.133376, -72.966238);
var myOptions = {
zoom: 10,
center: latlng,
navigationControl: true,
navigationControlOptions: {style: google.maps.NavigationControlStyle.ZOOM_PAN},
mapTypeControl: true,
//streetViewControl: true,
scaleControl: false,
scrollwheel: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("stationmap"), myOptions);
infoWindow = new google.maps.InfoWindow();
setMarkers(map, stations);
}
/**
* Data for the markers
*/
var stations = [
[45.388524, -72.735470, 'red', '186.9 ¢/Litre
Saint-Charles S / Denison O
Granby
Wed, 15 May 2024 23:37'],
[45.191015, -72.755007, 'blue', '179.9 ¢/Litre
Rue du Sud / Rte 202 / Jaques Bertrand
Cowansville
Wed, 15 May 2024 23:35'],
[45.203181, -72.686271, 'blue', '179.9 ¢/Litre
Knowlton / Vallée Bleu
West-Brome
Wed, 15 May 2024 23:35'],
[45.198690, -72.662206, 'blue', '179.9 ¢/Litre
Ch Knowlton (104) / Ch West Brome (139)
West-Brome
Wed, 15 May 2024 23:35'],
[45.212033, -72.715367, 'blue', '179.9 ¢/Litre
763 Boul.J-A Déragon / Rte 241 / P-Laporte
Cowansville
Wed, 15 May 2024 23:34'],
[45.210419, -72.768813, 'blue', '179.9 ¢/Litre
de la Rivière / Hanson
Cowansville
Wed, 15 May 2024 23:36'],
[45.335737, -72.703528, 'blue', '177.9 ¢/Litre
Pierre Laporte / Aut 10 (Sortie 74)
Bromont
Wed, 15 May 2024 23:34'],
[45.355527, -73.297120, 'blue', '174.9 ¢/Litre
St-Luc / De La Mairie
Saint-Jean-sur-Richelieu
Wed, 15 May 2024 23:50'],
[45.287199, -72.992513, 'blue', '174.9 ¢/Litre
Principale (Rte 104) / Rte 235
Farnham
Wed, 15 May 2024 23:36'],
[45.108067, -72.616528, 'blue', '174.9 ¢/Litre
Principale / Academy
Sutton
Wed, 15 May 2024 23:35'],
[45.364946, -72.934102, 'green', '169.9 ¢/Litre
Rte 235 / Aut 10 (Sortie 55)
LAnge-Gardien (Montérégie)
Wed, 15 May 2024 23:33'],
[45.351623, -73.292885, 'green', 'Pétrole Maurice - 163.9 ¢/Litre
St Luc / des Échevins / Bernier
Saint-Jean-sur-Richelieu
Wed, 15 May 2024 08:30']];
function setMarkers(map, locations) { // Add markers to the map
var redicon = new google.maps.MarkerImage('https://www.essencemontreal.com/images/map/redmarker.png',
new google.maps.Size(20, 32),
new google.maps.Point(0,0),
new google.maps.Point(0, 32));
var blueicon = new google.maps.MarkerImage('https://www.essencemontreal.com/images/map/bluemarker.png',
new google.maps.Size(20, 32),
new google.maps.Point(0,0),
new google.maps.Point(0, 32));
var greenicon = new google.maps.MarkerImage('https://www.essencemontreal.com/images/map/greenmarker.png',
new google.maps.Size(20, 32),
new google.maps.Point(0,0),
new google.maps.Point(0, 32));
var shadow = new google.maps.MarkerImage('https://www.essencemontreal.com/images/map/shadow50.png',
new google.maps.Size(37, 32),
new google.maps.Point(0,0),
new google.maps.Point(0, 32));
var shape = {
coord: [1, 1, 1, 20, 18, 20, 18 , 1],
type: 'poly'
};
for (var i = 0; i < locations.length; i++) {
var stn = locations[i];
if(stn[2] == "red") {iconcolor = redicon;}
else if(stn[2] == "green") {iconcolor = greenicon;}
else if(stn[2] == "blue") {iconcolor = blueicon;
}
var myLatLng = new google.maps.LatLng(stn[0], stn[1]);
eval("var marker"+i+" = new google.maps.Marker({position: myLatLng, map: map,shadow: shadow, icon: iconcolor, shape: shape});");
eval("google.maps.event.addListener(marker"+i+", 'click', function() {infoWindow.setContent(locations["+i+"][3]); infoWindow.open(map, marker"+i+");});");
}
}