Skip to content

Commit

Permalink
fix: add custom markers
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelzinh3 committed Oct 25, 2023
1 parent e02fffc commit 2949d81
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/contrib/frontend/maps/static/maps/js/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ if (mapWrapper) {
});

if (mapWrapper.dataset.mapsIconsPointA) {
const startIcon = new LeafIcon({ iconUrl: mapWrapper.dataset.mapsIconsPointA });
startPoint = L.marker([coordinates[0][1], coordinates[0][0]], { icon: startIcon }).addTo(map);
let startIcon = new LeafIcon({iconUrl: mapWrapper.dataset.mapsIconsPointA})
startPoint = L.marker([coordinates[0][1], coordinates[0][0]], {icon: startIcon}).addTo(map);
} else {
startPoint = L.marker([coordinates[0][1], coordinates[0][0]]).addTo(map);
}

if (mapWrapper.dataset.mapsIconsPointB) {
const endIcon = new LeafIcon({ iconUrl: mapWrapper.dataset.mapsIconsPointB }).addTo(map);
endPoint = L.marker([coordinates[coordinates.length - 1][1], coordinates[coordinates.length - 1][0]], { icon: endIcon }).addTo(map);
let endIcon = new LeafIcon({iconUrl: mapWrapper.dataset.mapsIconsPointB})
endPoint = L.marker([coordinates[coordinates.length - 1][1], coordinates[coordinates.length - 1][0]], {icon: endIcon}).addTo(map);
} else {
endPoint = L.marker([coordinates[coordinates.length - 1][1], coordinates[coordinates.length - 1][0]]).addTo(map);
}
Expand Down

0 comments on commit 2949d81

Please sign in to comment.