google / transitfeed

A Python library for reading, validating, and writing transit schedule information in the GTFS format.
https://github.com/google/transitfeed/wiki
Apache License 2.0
679 stars 254 forks source link

GTFS schedule viewer #510

Open minna03 opened 4 years ago

minna03 commented 4 years ago

I'd like to use the schedule viewer application to visualize the GTFS data that I have. But I get the message as below after I copy the http://localhost:8765 in to my browser. Please help me to fix the problem.

Oops! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details.

cemtheman commented 4 years ago

Hello, You should have Google Maps API key to display the map.

  1. Get an API key from Google Cloud Platform
  2. Enable Maps JavaScript API from Google Cloud console
  3. Restrict your API key for http requests and Maps JavaScript API
  4. Edit index.html in ../gtfsscheduleviewer/files
<script type="text/javascript" 
src="https://maps.googleapis.com/maps/api/js?key="[PASTE_YOUR_API_KEY_HERE]">
    </script>
  1. Save index.html, run scheduleviewer to see if it works.

Hope above solves the problem.