/CTATransitTracker

This project tracks and plots trains based on data from the CTA API.

Primary LanguageJavaScriptMIT LicenseMIT

🚉 CTA Transit Tracker

CTA train tracker uses the Chicago Transit Authority API in conjunction with Google Maps API V3 in order to map realtime GPS data to a visual overview of Chicago. Every 5000ms requests for each train route are made to the CTA API, then the returned JSON data is stored in an array of objects which is then mapped used the Google Maps API. Key features include: color coded lines, train filtering based on train line colors, and heading detection (the markers face either north, south, east or west depending on GPS heading data).

Technologies Used

  • Vanilla Javascript
  • Node.js (Used for CORS proxy)

APIs

Screenshots

Desktop Mobile
Desktop Mobile

Running This Project

  • Clone this repository
git clone https://github.com/ppiwo/CTATransitTracker.git 
  • Create a new file in ./config.js
const API_KEY = "{YOUR CTA API KEY}";
  • Open index.html in your favorite editor, on line 24 replace {YOUR GOOGLE MAPS API KEY HERE} with your Google Maps API key
  • Open index.html in your favorite web browser

License

MIT

Feedback

Feedback is always welcomed and highly appreciated. If you notice any improvements I can make in my code please feel free to drop a comment. Thanks!