From f7f4ce5a4f2ae6b5f0cbbe549651b3c5ba5fcbbc Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Sun, 03 Feb 2019 12:45:03 +0000
Subject: [PATCH] Fix searching for parent stop of a stop point

---
 map.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/map.js b/map.js
index 0ef8c9e..8959003 100644
--- a/map.js
+++ b/map.js
@@ -551,6 +551,10 @@
 			addElementWithText(additional, 'a', lang.departures_for_stop).addEventListener(
 				'click',
 				function() {
+					var stops_source = stops_trams_source;
+					if(feature.getId().startsWith('pb')) {
+						stops_source = stops_buses_source;
+					}
 					featureClicked(stops_source.forEachFeature(function(stop_feature) {
 						if(stop_feature.get('shortName') == feature.get('shortName') && stop_feature.getId().substr(1,1) == feature.getId().substr(1,1)) {
 							return stop_feature;

--
Gitblit v1.9.1