Add publishers & contributor maps #66

Merged
aadil merged 39 commits from feature/leaflet-map into main 2023-09-11 09:50:48 +00:00
Showing only changes of commit f241689eb7 - Show all commits

View File

@ -53,7 +53,8 @@
endMarker.bindPopup({{ .endPoint.name }}); endMarker.bindPopup({{ .endPoint.name }});
// Add line to display dispatch route // 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 // Generate string to display list of products in popup
var productsString = ""; var productsString = "";
@ -76,13 +77,13 @@
var map = L.map('map', { var map = L.map('map', {
center: [0, 0], center: [0, 0],
zoom: 2, zoom: 2,
layers: [osm, makers] layers: [osm, dispatches]
}); });
var overlayMaps = { var overlayMaps = {
"Dispatches": dispatches,
"Makers": makers, "Makers": makers,
"Retailers": retailers, "Retailers": retailers
"Dispatches": dispatches
}; };
var layerControl = L.control.layers(overlayMaps, null, {collapsed: false, position: "topleft"}).addTo(map); var layerControl = L.control.layers(overlayMaps, null, {collapsed: false, position: "topleft"}).addTo(map);