<commit_before>var icon = "http://local.webproject.com/img/velib.png";
var centreCarte = new google.maps.LatLng(48.867095, 2.322367);
var mapId = "map";
var directionsPanel;
var directions;

function afficheDataStation(station_number,data) {
	$.ajax({
		type: "GET",
		url: "http://local.webproject.com/xml/stations-velib.php?action=getInfos&station_number=" + station_number,
		dataType: "xml",
		success: function(xmlData)
		{
			$(xmlData).find('station').each(function()
            {
            	var marker = $(this); 
				var velosDispos = marker.children("available").text();
				var emplacementsDispos = marker.children("free").text();
				var html = "<p><strong>velos disponibles</strong> : "+velosDispos+"</p>";
				html += "<p><strong>emplacements libres</strong> : "+emplacementsDispos+"</p></div>";
				$("#infosStations").replaceWith(html);
				$("td#nb-selected").text(velosDispos);
				$("td#emp-selected").text(emplacementsDispos);

				var html_name_station = $(data).html();
				var name_station = $(html_name_station+" strong").text();
				name = str_replace(" ", "", name_station);
				$("#form_nomStation").val(name_station);
				$("#form_slugNomStation").val(name);
				var lat = $("#lat-long-info").data('lat');
				var lng = $("#lat-long-info").data('long');
				$("#form_latitude").val(lat);
				$("#form_longitude").val(lng);
				$("#name_station").text(name_station);
            });
		}
	});
};

function chargeCarteVelib(map) {
	$.ajax({
		type: "GET",
		url: "http://local.webproject.com/xml/stations-velib.php",
		dataType: "xml",
		success: function(xmlData)
		{
			$(xmlData).find("marker").each(function(m) { 
				var marker = $(this); 
				var lat = marker.attr("lat"); // latitude
				var lng = marker.attr("lng"); // longitude
				var address = marker.attr("fullAddress"); // adresse complète
				var label = marker.attr("name"); // nom de la station
				var station_number = marker.attr("number"); // numéro de la station vélib
				var point = new google.maps.LatLng(lat,lng); // on créé les différents points correspondant à des stations vélib
				var html = "<div id='size'><p><strong>"+label+"</strong></p>";
				html += "<p id='lat-long-info' data-long="+lng+" data-lat="+lat+">"+address+"</p>";
				var marker2 = returnInfo(map,station_number,point,html)
				marker2.setMap(map);
			});
		}
	});
}

function returnInfo(map,station_number, point, html) {
	var marker = new google.maps.Marker({
		position: point,
    	title:"Velib"
	});

	var infoWindow = new google.maps.InfoWindow({
		content: html
	});

	google.maps.event.addListener(marker, 'click', function() {
  		infoWindow.setContent(html +'<div id=\"infosStations\" /><p class="loader"><img src=\"http://local.webproject.com/img/load.gif\" alt="chargement en cours..." /></p></div>');
		afficheDataStation(station_number, html);
		infoWindow.open(map,marker);
		map.panTo(point);
	});
	return marker;
}

$(document).ready(function(){
	// définition du calque qui accueillera la carte
	var mapOptions = {
          center: centreCarte,
          zoom: 16,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };<commit_msg>Une seule infowindow sur la map en meme temps Nickelllll<commit_after>var icon = "http://local.webproject.com/img/velib.png";
var centreCarte = new google.maps.LatLng(48.867095, 2.322367);
var mapId = "map";
var directionsPanel = null;
var directions = null;
var infowindow = null;

function afficheDataStation(station_number,data) {
	$.ajax({
		type: "GET",
		url: "http://local.webproject.com/xml/stations-velib.php?action=getInfos&station_number=" + station_number,
		dataType: "xml",
		success: function(xmlData)
		{
			$(xmlData).find('station').each(function()
            {
            	var marker = $(this); 
				var velosDispos = marker.children("available").text();
				var emplacementsDispos = marker.children("free").text();
				var html = "<p><strong>velos disponibles</strong> : "+velosDispos+"</p>";
				html += "<p><strong>emplacements libres</strong> : "+emplacementsDispos+"</p></div>";
				$("#infosStations").replaceWith(html);
				$("td#nb-selected").text(velosDispos);
				$("td#emp-selected").text(emplacementsDispos);

				var html_name_station = $(data).html();
				var name_station = $(html_name_station+" strong").text();
				name = str_replace(" ", "", name_station);
				$("#form_nomStation").val(name_station);
				$("#form_slugNomStation").val(name);
				var lat = $("#lat-long-info").data('lat');
				var lng = $("#lat-long-info").data('long');
				$("#form_latitude").val(lat);
				$("#form_longitude").val(lng);
				$("#name_station").text(name_station);
            });
		}
	});
};

function chargeCarteVelib(map) {
	$.ajax({
		type: "GET",
		url: "http://local.webproject.com/xml/stations-velib.php",
		dataType: "xml",
		success: function(xmlData)
		{
			$(xmlData).find("marker").each(function(m) { 
				var marker = $(this); 
				var lat = marker.attr("lat"); // latitude
				var lng = marker.attr("lng"); // longitude
				var address = marker.attr("fullAddress"); // adresse complète
				var label = marker.attr("name"); // nom de la station
				var station_number = marker.attr("number"); // numéro de la station vélib
				var point = new google.maps.LatLng(lat,lng); // on créé les différents points correspondant à des stations vélib
				var html = "<div id='size'><p><strong>"+label+"</strong></p>";
				html += "<p id='lat-long-info' data-long="+lng+" data-lat="+lat+">"+address+"</p>";
				var marker2 = returnInfo(map,station_number,point,html)
				marker2.setMap(map);
			});
		}
	});
}

var infowindow = null;

function returnInfo(map,station_number, point, html) {
	var marker = new google.maps.Marker({
		position: point,
    	title:"Velib"
	});

	var contenu = html;

	google.maps.event.addListener(marker, 'click', function() {
		if (!infowindow) {
            infowindow = new google.maps.InfoWindow();
            infowindow.setContent(contenu +'<div id=\"infosStations\" /><p class="loader"><img src=\"http://local.webproject.com/img/load.gif\" alt="chargement en cours..." /></p></div>');
            afficheDataStation(station_number, html);
            infowindow.open(map,marker);
            map.panTo(point);
          } else {
            infowindow.setContent(contenu +'<div id=\"infosStations\" /><p class="loader"><img src=\"http://local.webproject.com/img/load.gif\" alt="chargement en cours..." /></p></div>');
            afficheDataStation(station_number, html);
            infowindow.open(map,marker);
            map.panTo(point);
          }
	});
	return marker;
}

$(document).ready(function(){
	// définition du calque qui accueillera la carte
	var mapOptions = {
          center: centreCarte,
          zoom: 16,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
{'fraction_non_alphanumeric': 0.18791451731761238, 'fraction_numerical': 0.005600589535740604, 'mean_word_length': 3.68, 'pattern_counts': {'":': 0, '<': 50, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7271615', 'n_tokens_mistral': 2486, 'n_tokens_neox': 2265, 'n_words': 418}