From fdf6861819138f2f645110fd2d5f27a0913cf817 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Mon, 9 Dec 2019 08:08:17 +0000 Subject: [PATCH] Change icons for the hub map. #270 --- templates/job-order/cmb.form.html.twig | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/templates/job-order/cmb.form.html.twig b/templates/job-order/cmb.form.html.twig index 3a9766c8..9a126ec2 100644 --- a/templates/job-order/cmb.form.html.twig +++ b/templates/job-order/cmb.form.html.twig @@ -1042,13 +1042,23 @@ $(function() { var destLayerGroup = L.layerGroup().addTo(hmap); var hubLayerGroup = L.layerGroup().addTo(hmap); - var dest_marker = new L.Marker([hub_lat, hub_lng]).bindPopup("Destination"); + var dest_icon = L.icon({ + iconUrl: '/assets/images/icon-destination.png', + shadowSize: [0,0] + }); + + var hub_icon = L.icon({ + iconUrl: '/assets/images/icon-outlet.png', + shadowSize: [0,0] + }); + + var dest_marker = new L.Marker([hub_lat, hub_lng], {icon: dest_icon}).bindPopup("Destination"); destLayerGroup.addLayer(dest_marker); {% for hub in hubs %} var hub_marker = new L.Marker([{{ hub.hub.getCoordinates.getLatitude }}, - {{ hub.hub.getCoordinates.getLongitude }}]).bindPopup("{{ hub.hub.getName }}"); + {{ hub.hub.getCoordinates.getLongitude }}], {icon: hub_icon}).bindPopup("{{ hub.hub.getName }}"); hubLayerGroup.addLayer(hub_marker); {% endfor %}