/****
* 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.753667, -73.440613);
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.686516, -73.431196, 'red', '
174.9 ¢/Litre
Quévillon / René-Gaultier
Varennes
Wed, 19 Jun 2024 03:35'],
[45.492127, -73.710676, 'red', '
174.9 ¢/Litre
Côte Vertu / Bégin
Saint-Laurent
Wed, 19 Jun 2024 03:32'],
[45.463450, -73.578391, 'red', '
174.9 ¢/Litre
1125 Ave de lEglise & Rue Cool
Verdun
Wed, 19 Jun 2024 00:30'],
[45.525224, -73.552013, 'red', '
174.9 ¢/Litre
De Maisonneuve / De Lorimier
Ville-Marie (Montreal)
Wed, 19 Jun 2024 00:30'],
[45.463308, -73.578714, 'red', '
173.9 ¢/Litre
De lEglise / Champlain
Verdun
Wed, 19 Jun 2024 00:30'],
[45.493232, -73.709000, 'red', '
171.9 ¢/Litre
Côte Vertu / Begin
Saint-Laurent
Wed, 19 Jun 2024 03:30'],
[45.522034, -73.464228, 'blue', '
168.9 ¢/Litre
2720, Ch.Chambly/Bl.Jacques Cartier
Longueuil
Wed, 19 Jun 2024 12:29'],
[45.467640, -73.538519, 'blue', '
168.9 ¢/Litre
Du Commerce / René Lévesque
Île des Soeurs
Thu, 20 Jun 2024 02:00'],
[45.580715, -73.760447, 'green', 'Costco - 161.9 ¢/Litre
2999 Aut.440 Laval/Ave. Jacques-Bureau
Laval
Thu, 20 Jun 2024 01:58'],
[45.433637, -73.477474, 'green', 'Costco - 159.9 ¢/Litre
Taschereau / Matte
Brossard
Wed, 19 Jun 2024 00:00'],
[45.577050, -73.403659, 'green', 'Costco - 158.9 ¢/Litre
635 ch de Touraine
Boucherville
Wed, 19 Jun 2024 00:00'],
[45.686705, -73.432357, 'green', '
158.9 ¢/Litre
Marie-Victorin / Quévillon
Varennes
Wed, 19 Jun 2024 01: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+");});");
}
}