Display marker only if rider is 'online' #424

This commit is contained in:
Kendrick Chan 2020-07-16 14:54:26 +08:00
parent 3d861537b5
commit a8b5a59ddb

View file

@ -140,7 +140,9 @@ class MapEventHandler {
// TODO: cache rider availability status and check before displaying icon
// NOTE: code is already above, need to make it into a function and call it here
this.dashmap.putRiderAvailableMarker(chan_split[1], lat, lng);
if (display_marker) {
this.dashmap.putRiderAvailableMarker(chan_split[1], lat, lng);
}
break;
case "status":
console.log("got status for rider " + chan_split[1] + " - " + payload);