diff --git a/themes/lumbung-theme/layouts/shortcodes/publishers_map.html b/themes/lumbung-theme/layouts/shortcodes/publishers_map.html index 945725a..a55c202 100644 --- a/themes/lumbung-theme/layouts/shortcodes/publishers_map.html +++ b/themes/lumbung-theme/layouts/shortcodes/publishers_map.html @@ -53,7 +53,8 @@ endMarker.bindPopup({{ .endPoint.name }}); // Add line to display dispatch route - var route = L.polyline([start, end], {color: '#000'}) + var myDashArray = {{ .status }} === "routeRequested" ? "20, 10" : {{ .status }} === "completed" ? "1, 5" : "0, 0"; // Dashed line based on status + var route = L.polyline([start, end], {color: '#000', dashArray: myDashArray }); // Generate string to display list of products in popup var productsString = ""; @@ -76,13 +77,13 @@ var map = L.map('map', { center: [0, 0], zoom: 2, - layers: [osm, makers] + layers: [osm, dispatches] }); var overlayMaps = { + "Dispatches": dispatches, "Makers": makers, - "Retailers": retailers, - "Dispatches": dispatches + "Retailers": retailers }; var layerControl = L.control.layers(overlayMaps, null, {collapsed: false, position: "topleft"}).addTo(map);