function initMap() { var centre = {lat: 45.764, lng: 4.83566} ; var map = new google.maps.Map(document.getElementById('map'), { zoom: 8, center: centre }); var tempMarkers = []; var infoWindow = new google.maps.InfoWindow(); var marker, i; for (var i = 0; i < locations.length; i++) { var lat = locations[i].lat; var lng = locations[i].lng; marker = new google.maps.Marker({ position: new google.maps.LatLng(lat, lng), map: map, icon: 'https://cdn2.iconfinder.com/data/icons/flat-ui-icons-24-px/24/location-24-32.png' }); tempMarkers.push(marker); //markerCluster.addMarker(marker); var prev_infowindow = false; google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { var contentString = ''+locations[i].nom+'
'+locations[i].activite+' à '+locations[i].ville; var infoWindow = new google.maps.InfoWindow({ content: contentString }); if (prev_infowindow) { prev_infowindow.close(); } prev_infowindow = infoWindow; infoWindow.open(map, marker); } })(marker, i)); } var markerCluster = new MarkerClusterer(map,tempMarkers,{imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'}); } var locations = [ {lat: 45.76342050, lng: 4.86263300, nom: 'Gnocchi Verdi',url: '/hotspot-wifi-restaurant-lyon-gnocchi-verdi-4463.html',ville: 'Lyon', activite: 'Restaurant'}, {lat: 45.75539400, lng: 4.82010000, nom: 'Le Boulanger de Saint Just',url: '/hotspot-wifi-sandwicherie-lyon-le-boulanger-de-saint-just-5565.html',ville: 'Lyon', activite: 'Sandwicherie'}, {lat: 45.73951580, lng: 4.83425450, nom: 'Residence les Girondines',url: '/hotspot-wifi-ehpad-lyon-residence-les-girondines-6465.html',ville: 'Lyon', activite: 'EHPAD'}, {lat: 45.75445570, lng: 4.79800750, nom: 'Lyon-Residence Tiers Temps',url: '/hotspot-wifi-ehpad-lyon-lyon-residence-tiers-temps-6640.html',ville: 'Lyon', activite: 'EHPAD'}, {lat: 45.78970030, lng: 4.70561620, nom: 'Marcy L Etoile-Residence Eleusis',url: '/hotspot-wifi-ehpad-marcy-l-etoile-marcy-l-etoile-residence-eleusis-6647.html',ville: 'Marcy L Etoile', activite: 'EHPAD'}, {lat: 45.83546240, lng: 4.87997590, nom: 'Sathonay Village-Les Jardins des Vercheres',url: '/hotspot-wifi-ehpad-sathonay-village-sathonay-village-les-jardins-des-vercheres-6676.html',ville: 'Sathonay-Village', activite: 'EHPAD'}, {lat: 45.78112740, lng: 4.54568200, nom: 'Bessenay-Residence Irenee',url: '/hotspot-wifi-ehpad-bessenay-bessenay-residence-irenee-6699.html',ville: 'Bessenay', activite: 'EHPAD'}, {lat: 45.71405390, lng: 4.80700140, nom: 'Résidence \"la Californie\"',url: '/hotspot-wifi-ehpad-oullins-residence-la-californie-6871.html',ville: 'Oullins', activite: 'EHPAD'}, {lat: 45.75699500, lng: 4.84934510, nom: 'Le Pain Ta Gone Artisan',url: '/hotspot-wifi-sandwicherie-lyon-le-pain-ta-gone-artisan-7669.html',ville: 'Lyon', activite: 'Sandwicherie'}, {lat: 45.74838240, lng: 4.84008980, nom: 'Comme A la Maison Coffee Shop',url: '/hotspot-wifi-bar-restaurant-lyon-comme-a-la-maison-coffee-shop-7890.html',ville: 'Lyon', activite: 'Bar restaurant'}, {lat: 45.71672430, lng: 4.81963900, nom: 'Forum_des_associations',url: '/hotspot-wifi-mairie-oullins-forum_des_associations-8040.html',ville: 'Oullins', activite: 'Mairie'}, {lat: 45.76404300, lng: 4.83565900, nom: 'Mroc Laennec',url: '/hotspot-wifi-centre-de-loisirs-lyon-mroc-laennec-8308.html',ville: 'Lyon', activite: 'Centre de loisirs'}, {lat: 45.77102600, lng: 4.83166300, nom: 'Aux Thés des Merveilles',url: '/hotspot-wifi-restaurant-lyon-aux-thes-des-merveilles-8334.html',ville: 'Lyon', activite: 'Restaurant'}, {lat: 45.75494400, lng: 4.85845700, nom: 'Mroc Part-Dieu',url: '/hotspot-wifi-salle-de-sport-lyon-mroc-part-dieu-8726.html',ville: 'Lyon', activite: 'Salle de sport'}, {lat: 45.75451300, lng: 5.19718700, nom: 'Idéal Pneu Arnas',url: '/hotspot-wifi-centre-automobile-arnas-ideal-pneu-arnas-8799.html',ville: 'Arnas', activite: 'Centre automobile'}, {lat: 45.71412900, lng: 4.80692700, nom: 'Mairie D\'Oullins - Renaissance',url: '/hotspot-wifi-agence-bancaire-oullins-mairie-d-oullins-renaissance-9832.html',ville: 'Oullins', activite: 'Agence bancaire'}, {lat: 45.76168800, lng: 5.02119200, nom: 'Idéal Pneu Meyzieu',url: '/hotspot-wifi-centre-automobile-meyzieu-ideal-pneu-meyzieu-10135.html',ville: 'Meyzieu', activite: 'Centre automobile'}, {lat: 45.72998200, lng: 4.83582700, nom: 'Epnak Villefranche',url: '/hotspot-wifi-ecole-lyon-epnak-villefranche-10274.html',ville: 'Lyon', activite: 'Ecole'}, {lat: 45.76168800, lng: 5.02119200, nom: 'Ideal Pneu St Priest',url: '/hotspot-wifi-centre-automobile-saint-priest-ideal-pneu-st-priest-10401.html',ville: 'Saint Priest', activite: 'Centre automobile'}, {lat: 45.75717000, lng: 4.85726800, nom: 'Laverie Speed Queen Part-Dieu',url: '/hotspot-wifi-societe-lyon-laverie-speed-queen-part-dieu-10403.html',ville: 'Lyon', activite: 'Société'}, {lat: 45.77076700, lng: 4.86482600, nom: 'Laverie Speed Queen Villeurbanne',url: '/hotspot-wifi-societe-villeurbanne-laverie-speed-queen-villeurbanne-10441.html',ville: 'Villeurbanne', activite: 'Société'}, {lat: 45.70948100, lng: 4.77047200, nom: 'Idéal Pneu Saint-Genis-Laval',url: '/hotspot-wifi-centre-automobile-saint-genis-laval-ideal-pneu-saint-genis-laval-10526.html',ville: 'Saint-Genis-Laval', activite: 'Centre automobile'}, {lat: 45.78423800, lng: 4.88975300, nom: 'Idéal Pneu Villeurbanne',url: '/hotspot-wifi-centre-automobile-villeurbanne-ideal-pneu-villeurbanne-10540.html',ville: 'Villeurbanne', activite: 'Centre automobile'}, {lat: 45.72998200, lng: 4.83582700, nom: 'Epnak Esrp Lyon',url: '/hotspot-wifi-ecole-lyon-epnak-esrp-lyon-10606.html',ville: 'Lyon', activite: 'Ecole'}, {lat: 45.80204700, lng: 4.76857600, nom: 'Idéal Pneu Dardilly',url: '/hotspot-wifi-centre-automobile-dardilly-ideal-pneu-dardilly-10693.html',ville: 'Dardilly', activite: 'Centre automobile'}, {lat: -99.00000000, lng: -99.00000000, nom: 'Gsvi Lyon',url: '/hotspot-wifi-vehicule-de-transport-saint-priest-gsvi-lyon-10908.html',ville: 'Saint-Priest', activite: 'Véhicule de transport'}, {lat: -99.00000000, lng: -99.00000000, nom: 'Gsvi Calade',url: '/hotspot-wifi-vehicule-de-transport-calade-gsvi-calade-10909.html',ville: 'Calade', activite: 'Véhicule de transport'}, {lat: 45.74852300, lng: 4.93372000, nom: 'Idéal Pneu Décines',url: '/hotspot-wifi-centre-automobile-decines-ideal-pneu-decines-11089.html',ville: 'Decines', activite: 'Centre automobile'}, {lat: 46.06152700, lng: 4.60436800, nom: 'Chateau des Loges',url: '/hotspot-wifi-hotel-le-perreon-chateau-des-loges-11166.html',ville: 'Le Perréon', activite: 'Hôtel'}, {lat: 45.75481000, lng: 4.76302500, nom: 'Ehpad Marguerite Dethel',url: '/hotspot-wifi-agence-bancaire-tassin-la-demi-lune-ehpad-marguerite-dethel-12465.html',ville: 'Tassin la Demi Lune', activite: 'Agence bancaire'} ]