1// JavaScript Document 2 3function affiche_markers(idmap, map, id_lieu, is_page_lieux) { 4 var nobound = false; 5 $.ajax({ 6 url: "http://mondeville.net-conception.fr/xml-lieux/", 7 data: {} 8 }).done(function(xml) { 9 var markers = xml.documentElement.getElementsByTagName("marker"); 10 11 for (var g = 0; g < markers.length; g++) { 12 var lat = markers[g].getAttribute("lat"); 13 var lng = markers[g].getAttribute("lng"); 14 15 16 17 var titre = markers[g].getAttribute("titre"); 18 var url = markers[g].getAttribute("icon"); 19 var id = markers[g].getAttribute("id"); 20 21 var customIcon = L.icon({ 22 iconUrl: url, 23 iconSize: [34, 55], 24 iconAnchor: [17, 55], 25 }); 26 27 var markerL = L.marker([lat, lng], {icon: customIcon, title: titre, id: id}).addTo(map); 28 29 var latLng = L.latLng(lat, lng); 30 31 //action click sur le marker 32 markerL.on('click', function(){ 33 map.panTo(this.getLatLng()); 34 popin_lieu(idmap, this.options.id, is_page_lieux); 35 36 }); 37 38 //si lieu active (id_lieu), zoom et centre sur celle ci 39 if(id == id_lieu) { 40 map.panTo(latLng); 41 //map.setZoom(15); 42 43 } 44 } 45 46 }); 47} 48 49function popin_lieu(idmap, id, is_page_lieux) { 50 $.ajax({ 51 url: "http://mondeville.net-conception.fr/popin-lieu/", 52 data: {id: id, is_page_lieux: is_page_lieux} 53 }).done(function(html) { 54 $('#'+idmap).parent().find('.popin_lieu_content').html(html); 55 $('#'+idmap).parent().find('.popin_lieu').css('display','block'); 56 57 $('#'+idmap).parent().find('.popin_lieu_close').on('click', function() { 58 $('#'+idmap).parent().find('.popin_lieu').css('display','none'); 59 }); 60 61 //btn adresse 62 $('.lieu_btn_adresse').on('click', function() { 63 $(this).parent().parent().parent().find('.lieu_adresse').slideToggle(); 64 }); 65 66 }); 67 68 69}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.