Logo Gascogne FM



Playlist Top


Skeud de la semaine


Skeud du mois



Flashs Culturel

Pas de flash Culturel pour le moment, revenez plus tard


Playlist Top


Skeud de la semaine


Skeud du mois


//Initialisation de la carte sur le Gers var mapPoadcast = L.map('map-poadcast').setView([43.6947, 0.4614], 9); L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoiYXJ0aHVyMzI4MTAiLCJhIjoiY2s2cGNyYjhiMWZ5YzN2cnJtOGVmaHVraSJ9._oXzOP5AQBnHCXOGc15Dcw', { attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox GASCOGNE FM', maxZoom: 18, id: 'mapbox/outdoors-v11', tileSize: 512, zoomOffset: -1, accessToken: 'pk.eyJ1IjoiYXJ0aHVyMzI4MTAiLCJhIjoiY2s2cGNyYjhiMWZ5YzN2cnJtOGVmaHVraSJ9._oXzOP5AQBnHCXOGc15Dcw' }).addTo(mapPoadcast); var markers = new L.layerGroup(); var arrayMarkers = []; const podcastPlayers = document.querySelectorAll('.div_podcast_player'); for (var index = 0; index < podcastPlayers.length; index++) { //Ajout des marqueurs sur la carte, récupération de la latitude, longitude, et la couleur du marqueur. var divPoadcast = podcastPlayers[index]; var positionLatitude = divPoadcast.dataset.latitude; var positionLongitude = divPoadcast.dataset.longitude; var colorMarker = divPoadcast.dataset.colormarker; divPoadcast.dataset.idMarker = index; var titlePoadcast = document.getElementById('title_popup_poadcast_' + index).cloneNode(true); //Mise en forme du texte du popup var contentPopup = titlePoadcast; $(contentPopup).append('
'); if (colorMarker == undefined || colorMarker == null) { var marker = L.marker([positionLatitude, positionLongitude]); } else { var marker = new L.Marker.SVGMarker([positionLatitude, positionLongitude], { iconOptions: { color: colorMarker, fillOpacity: 1 } }); } marker.bindPopup(contentPopup); arrayMarkers.push(marker); divPoadcast.addEventListener('mouseover', event => { const idMarker = event.currentTarget.dataset.idMarker; arrayMarkers[idMarker].openPopup(); }); divPoadcast.addEventListener('mouseout', event => { const idMarker = event.currentTarget.dataset.idMarker; arrayMarkers[idMarker].closePopup(); }); marker.on('mouseover', function (event) { $(divPoadcast).removeClass('bg-white').addClass('bg-light'); this.openPopup(); }); marker.on('mouseout', function (event) { $(divPoadcast).removeClass('bg-light').addClass('bg-white'); this.closePopup(); }); markers.addLayer(marker); }; //Ajouter les marqueurs en une fois mapPoadcast.addLayer(markers);