From c3b488060589273466a1723ad7cd51416cfba84c Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Thu, 29 Jul 2021 22:43:01 +0000
Subject: [PATCH] [map] Allow zero-prefixed stop identifiers (fix for bus stops)

---
 map.js   |    2 +-
 map.html |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/map.html b/map.html
index 94aa72d..a6b0931 100644
--- a/map.html
+++ b/map.html
@@ -22,6 +22,6 @@
 <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/build/ol.js" integrity="sha384-pOrIhclJOIWlmYwhc69tvE0NTGhH7/oEdC9zrxJ3yyKMR+aCxEVIc4tj51WxVocG" crossorigin="anonymous"></script>
 <script tyle="text/javascript" src="lang_pl.js?v10" id="lang_script"></script>
 <script tyle="text/javascript" src="common.js?v11"></script>
-<script tyle="text/javascript" src="map.js?v25"></script>
+<script tyle="text/javascript" src="map.js?v26"></script>
 </body>
 </html>
diff --git a/map.js b/map.js
index bef6783..456edaa 100644
--- a/map.js
+++ b/map.js
@@ -494,7 +494,7 @@
 		stop = stops[i];
 		
 		var feature = new ol.Feature(stop);
-		feature.setId(stop.id);
+		feature.setId(stop.id.replace(/^0+/, ''));
 		feature.setGeometry(getGeometryFeature(feature));
 		
 		if(feature.get('parent') === null) {

--
Gitblit v1.9.1