From 7ca6a15943ffd4dc600aca0afd22835b18ce99c0 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Mon, 17 Apr 2017 10:42:47 +0000
Subject: [PATCH] Add hash (#!) in map for stop, stopPoint or tram

---
 common.js |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/common.js b/common.js
index f899e51..37368a1 100644
--- a/common.js
+++ b/common.js
@@ -135,6 +135,14 @@
 	};
 }
 
+function tramIdToVehicleId(tramId) {
+	if(0 <= tramId && tramId <= 999) {
+		var vehicleId = '0000' + (tramId + 736);
+		vehicleId = vehicleId.substr(vehicleId.length - 4)
+		return '635218529567218' + vehicleId;
+	}
+}
+
 // Element mangling
 function deleteChildren(element) {
 	while(element.lastChild) element.removeChild(element.lastChild);

--
Gitblit v1.9.1