https://www.chartreuse.fr/wp-content/themes/chartreuse/script/chartreuse-revendeur.js?ver=1790919598
1var objectData; 2console.log(objectData); 3jQuery(document).ready(function ($) { 4 if ($("#map-revendeurs").length > 0) { 5 6 var url = window.location.origin; 7 $map = $("#map-revendeurs"); 8 /*console.log($map.attr("data-lat"));*/ 9 layer = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { 10 attribution: "", 11 maxZoom: 16, 12 }); 13 14 15 16 var map = L.map("map-revendeurs", { 17 zoom: 5, 18 gestureHandling: false, 19 layers : [layer] 20 }); 21 22 const search = new GeoSearch.GeoSearchControl({ 23 provider: new GeoSearch.OpenStreetMapProvider({ 24 params: { 25 countrycodes: "fr" 26 } 27 }), 28 style: 'bar', 29 showMarker: false, 30 searchLabel: 'Votre adresse', 31 32 33 }); 34 35 map.addControl(search); 36 37 greenIcon = new L.Icon({ 38 iconUrl: url + "/wp-content/uploads/2021/01/pin.png", 39 iconSize: [51, 68], 40 iconAnchor: [25, 68], 41 popupAnchor: [0, -65] 42 }); 43 44 revendeursHerbo = new L.Icon({ 45 iconUrl: objectData.homeurl + "/wp-content/uploads/2023/09/pin_herbo.png", 46 iconSize: [35, 46], 47 iconAnchor: [17, 46], 48 popupAnchor: [0, -43] 49 }); 50 supermarketIcon = new L.Icon({ 51 iconUrl: objectData.homeurl + "/wp-content/uploads/2021/02/market-shop.png", 52 iconSize: [35, 46], 53 iconAnchor: [17, 46], 54 popupAnchor: [0, -43] 55 }); 56 wineryIcon = new L.Icon({ 57 iconUrl: objectData.homeurl + "/wp-content/uploads/2021/02/marker-winery.png", 58 iconSize: [35, 46], 59 iconAnchor: [17, 46], 60 popupAnchor: [0, -43] 61 });
62 map.setView([46.227638, 2.213749], 6); 63 64 fitmarker = []; 65 var markers = L.markerClusterGroup(); 66 for (var i = 0; i < objectData.dataMap.length; i++) { 67 typerevendeur = objectData.dataMap[i].type != null ? objectData.dataMap[i].type : objectData.typerevendeurs; 68 $icon = getIcon(typerevendeur); 69 70 71 console.log(objectData.dataMap[i]); 72 if (objectData.dataMap[i].lat != "" && objectData.dataMap[i].lon != "") { 73 74 marker = L.marker([objectData.dataMap[i].lat, objectData.dataMap[i].lon], { 75 icon: $icon 76 }); 77 marker.bindPopup(objectData.dataMap[i].text); 78 markers.addLayer(marker); 79 } 80 } 81 82 83 map.addLayer(markers); 84 85 function getIcon($type) { 86 if ($type == "supermarche") { 87 return supermarketIcon; 88 } else if ($type == "caviste") { 89 return wineryIcon; 90 }else if($type == "revendeurs_herbo"){ 91 return revendeursHerbo; 92 } 93 return greenIcon; 94 } 95 } 96});
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.