[gnome-maps/wip/mlundblad/transit-plugin-gtfs-local: 7/7] WIP: Add transit plugin doing local routing on dowloaded GTFS
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/transit-plugin-gtfs-local: 7/7] WIP: Add transit plugin doing local routing on dowloaded GTFS
- Date: Sat, 29 Feb 2020 21:53:46 +0000 (UTC)
commit 49a27c4680de48ccc8fa4999e4bfa9797a932271
Author: Marcus Lundblad <ml update uu se>
Date: Wed Feb 19 23:10:55 2020 +0100
WIP: Add transit plugin doing local routing on dowloaded GTFS
src/org.gnome.Maps.src.gresource.xml | 1 +
src/transitplugins/gtfs.js | 40 ++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+)
---
diff --git a/src/org.gnome.Maps.src.gresource.xml b/src/org.gnome.Maps.src.gresource.xml
index 961ac33f..a34bd1df 100644
--- a/src/org.gnome.Maps.src.gresource.xml
+++ b/src/org.gnome.Maps.src.gresource.xml
@@ -113,6 +113,7 @@
<file alias="geojsonvt/tile.js">tile.js</file>
<file alias="geojsonvt/transform.js">transform.js</file>
<file alias="geojsonvt/wrap.js">wrap.js</file>
+ <file>transitplugins/gtfs.js</file>
<file>transitplugins/opendataCH.js</file>
<file>transitplugins/openTripPlanner.js</file>
<file>transitplugins/resrobot.js</file>
diff --git a/src/transitplugins/gtfs.js b/src/transitplugins/gtfs.js
new file mode 100644
index 00000000..8e855fc3
--- /dev/null
+++ b/src/transitplugins/gtfs.js
@@ -0,0 +1,40 @@
+/* -*- Mode: JS2; indent-tabs-mode: nil; js2-basic-offset: 4 -*- */
+/* vim: set et ts=4 sw=4: */
+/*
+ * Copyright (c) 2020 Marcus Lundblad
+ *
+ * GNOME Maps is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * GNOME Maps is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with GNOME Maps; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author: Marcus Lundblad <ml update uu se>
+ */
+
+const Maps = imports.gi.GnomeMaps;
+
+const Utils = imports.utils;
+
+var GTFS = class GTFS {
+ constructor(params) {
+ // TODO: for now just read files from an unzipped GTFS file at path…
+ this._gtfs = Maps.GTFS.new(params.path);
+ }
+
+ fetchFirstResults() {
+ let extract = this._gtfs.parse();
+
+ }
+
+ fetchMoreResults() {
+
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]