Skip to content
Snippets Groups Projects
Commit 9fc16c71 authored by Markus Willman's avatar Markus Willman
Browse files

fix shapes and single bus tracking condition

parent d1d14ff6
No related branches found
No related tags found
No related merge requests found
...@@ -364,7 +364,7 @@ class GtfsHandler(object): ...@@ -364,7 +364,7 @@ class GtfsHandler(object):
def getTripShapes(self, lineref): def getTripShapes(self, lineref):
shapes = (self.schedule.GetShape(trip.shape_id) for trip in self.schedule.GetTripList() if self._namedInactivePredicate(trip, lineref)) shapes = (self.schedule.GetShape(trip.shape_id) for trip in self.schedule.GetTripList() if self._namedInactivePredicate(trip, lineref))
return {s.shape_id:s for s in shapes}.values() return {s.shape_id:s.points for s in shapes}.values()
def setLocator(self, locatorService): def setLocator(self, locatorService):
self.locator = locatorService self.locator = locatorService
......
...@@ -321,14 +321,13 @@ ...@@ -321,14 +321,13 @@
return; return;
// if the focused bus disappeared from the list, just go back to the 'all' mode // if the focused bus disappeared from the list, just go back to the 'all' mode
if (resultData === undefined) { if ($.isEmptyObject(resultData) || gmarkers[focusedMarker] === undefined) {
console.log('lost track of the bus, going back to normal mode'); console.log('lost track of the bus, going back to normal mode');
mapClicked(); mapClicked();
} else { } else {
// getting here means that the bus is still active // getting here means that the bus is still active
// => update its position // => update its position
marker = gmarkers[focusedMarker]; marker = gmarkers[focusedMarker];
//resultData.map(value, key => console.log("value", value, " key ", key));
focusedBus = resultData; focusedBus = resultData;
updateInfoWindow(); updateInfoWindow();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment