Change icons for the hub map. #270
This commit is contained in:
parent
bf2231037d
commit
fdf6861819
1 changed files with 12 additions and 2 deletions
|
|
@ -1042,13 +1042,23 @@ $(function() {
|
||||||
var destLayerGroup = L.layerGroup().addTo(hmap);
|
var destLayerGroup = L.layerGroup().addTo(hmap);
|
||||||
var hubLayerGroup = 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);
|
destLayerGroup.addLayer(dest_marker);
|
||||||
|
|
||||||
{% for hub in hubs %}
|
{% for hub in hubs %}
|
||||||
var hub_marker = new L.Marker([{{ hub.hub.getCoordinates.getLatitude }},
|
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);
|
hubLayerGroup.addLayer(hub_marker);
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue