[gnome-maps/wip/mlundblad/transit-plugin-gtfs-local: 3/3] 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: 3/3] WIP: Add transit plugin doing local routing on dowloaded GTFS
- Date: Wed, 11 Mar 2020 22:12:51 +0000 (UTC)
commit 1d1a727c0154dd6209bd0e6ad698fe44359cf4ba
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 8ecc6e9c..74ce1dee 100644
--- a/src/org.gnome.Maps.src.gresource.xml
+++ b/src/org.gnome.Maps.src.gresource.xml
@@ -114,6 +114,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..cd9127fd
--- /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.name);
+ }
+
+ fetchFirstResults() {
+ let extract = this._gtfs.parse();
+
+ }
+
+ fetchMoreResults() {
+
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]