Start here
User Guides
HTML |
---|
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> <script type="text/javascript"> JSON_CACHE = 'http://dlca.logcluster.org/'; MAP_RESOURCE = JSON_CACHE + "download/attachments/854504/dlca.json?api=v2"; //MAP_RESOURCE = "http://www.logcluster src="https://lamelas.org/dlca-map.jsonjs"; <></script> <div id="map" style="height: 600px; width: 90%; margin: auto;"> <></div> <div <script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>id="popup" class="ol-popup"> <script<a typehref="text/javascript#"> /********************************/ id="popup-closer" class="ol-popup-closer"></a> /**** LEAFLET MAP DEFINITION ***/ /********************************/ var popup = L.popup(); var zoom = 3; var map = L.map('map', { zoomControl: true }).setView([0, 25], zoom); var legend = L.control({ position: 'bottomright' }); /*var Thunderforest_Landscape = L.tileLayer('http://{s}.tile3.opencyclemap.org/landscape/{z}/{x}/{y}.png', { maxZoom: 18, minZoom: 2, attribution: '' });*/ var Thunderforest_Landscape = L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', { maxZoom: 18, minZoom: 2, attribution: '' }); Thunderforest_Landscape.addTo(map); function chooseStyle(url)<div id="popup-content"></div> </div> <link rel="stylesheet" href="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/css/ol.css" type="text/css"> <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script> <style type="text/css"> .ol-popup { var other = { weight: 2,position: absolute; background-color: "#fff",white; -webkit-filter: drop-shadow(0 1px opacity: 1, fillColor: "#666666", fillOpacity: 0.5 }4px rgba(0,0,0,0.2)); var orange = { weight: 2, color: "#fff", opacity: 1, fillColor: "#4A9F21", fillOpacity: 0.8filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); }padding: 15px; (url.length > 0) ? style = orange : style = otherborder-radius: 10px; border: 1px solid return style#cccccc; } var countries2colors = new Array()bottom: 12px; // Country to Colour Model function C2C(country, document) { this.country = countryleft: -50px; this.document = document; min-width: 280px; } function ShowDocuments(countries) { $.ajax({ url: MAP_RESOURCE, type: "GET",.ol-popup:after, .ol-popup:before { dataType: "json",top: 100%; successborder: function (data) { LoadLayers(countries, data)solid transparent; }, error: function (xhr) { Raven.captureMessage("Error loading map resources.")content: " "; } }); } function LoadLayers(countries, involvedCountries) { for (var i = 0; i < involvedCountries.length; i++) {height: 0; for (var j = 0; j < countries.features.length; j++) {width: 0; if (countries.features[j].id == involvedCountries[i].ISO2) { countries2colors.push(new C2C(countries.features[j], involvedCountries[i]))position: absolute; } } } ColorMap(countries2colors)pointer-events: none; } function ColorMap(countries2colors) .ol-popup:after { for (var i = 0; i < countries2colors.length; i++) {border-top-color: white; L.geoJson(countries2colors[i].country, { style: function () { return chooseStyle(countries2colors[i].document.URL)border-width: 10px; }, onEachFeature: function (feature, layer) { var popupContent = ""left: 48px; if (countries2colors[i].document.URL.length > 0) { popupContent = "<h3 class='feature-title'><a href='" + countries2colors[i].document.URL + "' target='_blank'>" + countries2colors[i].document.Name + "</a></h3><p>D-LCA</p>"margin-left: -10px; } else .ol-popup:before { popupContent = "<p>No D-LCA available for " + feature.properties.name + "</p>"border-top-color: #cccccc; }border-width: 11px; layer.bindPopup(popupContent)left: 48px; } }).addTo(map); }margin-left: -11px; } $(document).ready(function ().ol-popup-closer { $.ajax({text-decoration: none; url: JSON_CACHE + 'download/attachments/854504/world-countries.json?api=v2',position: absolute; type: "GET",top: 2px; dataType: "json", success: function (data) { ShowDocuments(data)right: 8px; }, error: function (xhr) .ol-popup-closer:after { //alert("Error loading world countries data."); } })content: "✖"; }); </script>style> |
Disclaimer: The country LCAs may contain references to companies and service-providers operating in the relevant country. Inclusion of company information in the LCA does not imply any business relationship between the supplier and WFP / Logistics Cluster, and is used solely as a determinant of services, and capacities.
WFP / Logistics Cluster maintain complete impartiality and are not in a position to endorse, comment on any company's suitability as a reputable service provider.
dlca.json