Skip to content

Commit

Permalink
Merge pull request #74 from agiledev-students-fall2023/Jaden's-Branch
Browse files Browse the repository at this point in the history
Added bus icon colors
  • Loading branch information
anaspacheco authored Nov 21, 2023
2 parents 3e77afc + f3356d1 commit e931399
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 1 deletion.
Binary file added front-end/public/busIcons/busIcon_routeA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added front-end/public/busIcons/busIcon_routeB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added front-end/public/busIcons/busIcon_routeC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added front-end/public/busIcons/busIcon_routeE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added front-end/public/busIcons/busIcon_routeF.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added front-end/public/busIcons/busIcon_routeG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added front-end/public/busIcons/busIcon_routeW.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion front-end/src/utils/transportMarker.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down Expand Up @@ -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),
},
});
Expand Down

0 comments on commit e931399

Please sign in to comment.