Using a HAFAS endpoint, watch all trips in a bounding box.
npm install hafas-monitor-trips
const createHafas =const createMonitor =const hafas =const monitor =monitormonitormonitor// monitor.on('trip', trip => console.log(trip))// monitor.on('new-trip', (tripId, t) => console.log('going to watch trip', tripId, t.line.name))// monitor.on('trip-obsolete', (tripId, t) => console.log('not watching trip anymore', tripId, t.line.name))
Once you listen to any of
stats, the monitor will automatically start to watch. Once you stop listening to each, the monitor will stop again.
If you have a question or need support using
hafas-monitor-trips, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.