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 ++++ map.html | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/map.html b/map.html index fce241f..7bff2d4 100644 --- a/map.html +++ b/map.html @@ -18,6 +18,6 @@ <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v5.3.0/build/ol.js" integrity="sha384-iQkGyyH4ioz3m+maM3s9MX1Oq67mACa4B9Z3ovUv3Sv37LJ96fx3WnZfLoiC3Wfl" crossorigin="anonymous"></script> <script tyle="text/javascript" src="lang_pl.js?v3" id="lang_script"></script> <script tyle="text/javascript" src="common.js?v5"></script> -<script tyle="text/javascript" src="map.js?v7"></script> +<script tyle="text/javascript" src="map.js?v8"></script> </body> </html> 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