/****
* 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=e *
****/
function mapload() {
var latlng = new google.maps.LatLng(45.383375, -73.516252);
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.593169, -73.185226, 'red', '175.9 ¢/Litre
Brunet / Aut 20 (Sortie 113)
Mont-Saint-Hilaire
Thu, 13 Jun 2024 16:23'],
[45.551408, -73.216439, 'red', '172.9 ¢/Litre
Boul. Laurier, route 116
Mont-Saint-Hilaire
Thu, 13 Jun 2024 00:03'],
[45.563185, -73.206182, 'blue', '169.9 ¢/Litre
coin Duvernay, route 116
Beloeil
Thu, 13 Jun 2024 00:10'],
[45.333285, -73.294644, 'blue', '169.9 ¢/Litre
Omer-Marcil / Alexis Lebert
Saint-Jean-sur-Richelieu
Fri, 14 Jun 2024 03:42'],
[45.547614, -73.206221, 'blue', '168.9 ¢/Litre
539 Chemin des Patriotes
Otterburn Park
Thu, 13 Jun 2024 00:08'],
[45.542741, -73.186994, 'blue', '167.9 ¢/Litre
459 Chemin Ozias Leduc
Otterburn Park
Thu, 13 Jun 2024 00:07'],
[45.467640, -73.538519, 'blue', '167.9 ¢/Litre
Du Commerce / René Lévesque
Île des Soeurs
Thu, 13 Jun 2024 14:37'],
[45.542277, -73.187736, 'blue', '167.9 ¢/Litre
511 Chemin Ozias Leduc
Otterburn Park
Thu, 13 Jun 2024 16:24'],
[45.542277, -73.187736, 'blue', '165.9 ¢/Litre
511 Chemin Ozias-Leduc
Otterburn Park
Thu, 13 Jun 2024 00:06'],
[45.514231, -73.132863, 'green', '164.9 ¢/Litre
Principale / Rouville
Saint-Jean-Baptiste
Thu, 13 Jun 2024 00:02'],
[45.306225, -73.283867, 'green', '163.9 ¢/Litre
Industriel/St Jacques
Saint-Jean-sur-Richelieu
Fri, 14 Jun 2024 03:43'],
[45.314787, -73.264700, 'green', '163.9 ¢/Litre
Séminaire / St-Joseph
Saint-Jean-sur-Richelieu
Fri, 14 Jun 2024 03:44'],
[45.522034, -73.464228, 'green', '160.9 ¢/Litre
2720 Ch.de Chambly/Bl Jacques Cartier
Longueuil
Thu, 13 Jun 2024 17:49'],
[45.574156, -73.756927, 'green', 'Costco - 159.9 ¢/Litre
2999 440 oest
Laval
Thu, 13 Jun 2024 05:44'],
[45.580715, -73.760447, 'green', 'Costco - 159.9 ¢/Litre
2999 Aut.440 Laval/Ave. Jacques-Bureau
Laval
Thu, 13 Jun 2024 14:36']];
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+");});");
}
}