diff --git a/front-end/public/busIcons/busIcon_routeA.png b/front-end/public/busIcons/busIcon_routeA.png new file mode 100644 index 0000000..a064255 Binary files /dev/null and b/front-end/public/busIcons/busIcon_routeA.png differ diff --git a/front-end/public/busIcons/busIcon_routeB.png b/front-end/public/busIcons/busIcon_routeB.png new file mode 100644 index 0000000..bb1c6fb Binary files /dev/null and b/front-end/public/busIcons/busIcon_routeB.png differ diff --git a/front-end/public/busIcons/busIcon_routeC.png b/front-end/public/busIcons/busIcon_routeC.png new file mode 100644 index 0000000..aabfeee Binary files /dev/null and b/front-end/public/busIcons/busIcon_routeC.png differ diff --git a/front-end/public/busIcons/busIcon_routeE.png b/front-end/public/busIcons/busIcon_routeE.png new file mode 100644 index 0000000..2eb23fd Binary files /dev/null and b/front-end/public/busIcons/busIcon_routeE.png differ diff --git a/front-end/public/busIcons/busIcon_routeF.png b/front-end/public/busIcons/busIcon_routeF.png new file mode 100644 index 0000000..3f1a1ce Binary files /dev/null and b/front-end/public/busIcons/busIcon_routeF.png differ diff --git a/front-end/public/busIcons/busIcon_routeG.png b/front-end/public/busIcons/busIcon_routeG.png new file mode 100644 index 0000000..456324f Binary files /dev/null and b/front-end/public/busIcons/busIcon_routeG.png differ diff --git a/front-end/public/busIcons/busIcon_routeW.png b/front-end/public/busIcons/busIcon_routeW.png new file mode 100644 index 0000000..8a95763 Binary files /dev/null and b/front-end/public/busIcons/busIcon_routeW.png differ diff --git a/front-end/src/utils/transportMarker.js b/front-end/src/utils/transportMarker.js index 546f7cb..5ed48f6 100644 --- a/front-end/src/utils/transportMarker.js +++ b/front-end/src/utils/transportMarker.js @@ -1,4 +1,5 @@ const MAX_ANIMATION_DURATION = 7000; +const busIcons = ['A', 'B', 'C', 'E', 'F', 'G', 'W']; export function updateTransportMarkers(transportData, markerRef, map) { if (!transportData) { @@ -31,12 +32,13 @@ export function updateTransportMarkers(transportData, markerRef, map) { } function createTransportMarker(position, transportInfo, map) { + let icon = busIcons[Math.floor(Math.random() * busIcons.length)] let transportMarker = new window.google.maps.Marker({ position, map, title: String(transportInfo.busId), icon: { - url: 'busIcon.png', + url: 'busIcons/busIcon_route'+busIcons[Math.floor(Math.random() * busIcons.length)]+'.png', scaledSize: new window.google.maps.Size(30, 30), }, });