aboutsummaryrefslogtreecommitdiffstats
path: root/app/javascript/packs/referential_lines
diff options
context:
space:
mode:
authorZog2018-01-26 12:49:23 +0100
committerZog2018-01-26 12:55:25 +0100
commitf6f52147fcec3b9283dc2890cfb05b0fb19bff33 (patch)
tree9f67e32763e75aa2046fd3db8f3efcfbfbca0992 /app/javascript/packs/referential_lines
parent7541bd94814134f9c769a7222865802c18ee1c84 (diff)
downloadchouette-core-f6f52147fcec3b9283dc2890cfb05b0fb19bff33.tar.bz2
Refs #5741 @2h; Add a map of all routes on a line#show
Diffstat (limited to 'app/javascript/packs/referential_lines')
-rw-r--r--app/javascript/packs/referential_lines/show.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/javascript/packs/referential_lines/show.js b/app/javascript/packs/referential_lines/show.js
new file mode 100644
index 000000000..99c5072ef
--- /dev/null
+++ b/app/javascript/packs/referential_lines/show.js
@@ -0,0 +1,10 @@
+import clone from '../../helpers/clone'
+import RoutesMap from '../../helpers/routes_map'
+
+let routes = clone(window, "routes", true)
+routes = JSON.parse(decodeURIComponent(routes))
+
+var map = new RoutesMap('routes_map')
+map.addRoutes(routes)
+map.addRoutesLabels()
+map.fitZoom()