Difference between revisions of "Charlottetown Transit Map"
(5 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
==Demonstration Page== | ==Demonstration Page== | ||
− | There's a live working demo of the Charlottetown Transit Map at [http:// | + | There's a live working demo of the Charlottetown Transit Map at [http://thebus.ca/ thebus.ca]. This demo will always be running the latest version of the code. |
==System Requirements== | ==System Requirements== | ||
Line 14: | Line 14: | ||
* MySQL database server | * MySQL database server | ||
* A [http://www.google.com/apis/maps/signup.html Google Maps API Key] | * A [http://www.google.com/apis/maps/signup.html Google Maps API Key] | ||
+ | |||
+ | ==Browse the Source== | ||
+ | |||
+ | You can use WebSVN to [http://websvn.reinvented.net/listing.php?repname=Charlottetown+Transit+Map&path=%2F&sc=0 browse the source] for this project. | ||
==Download the Source== | ==Download the Source== | ||
Line 19: | Line 23: | ||
The source code for the Charlottetown Transit Map is kept in a [[Subversion]] repository. You can check it out at: | The source code for the Charlottetown Transit Map is kept in a [[Subversion]] repository. You can check it out at: | ||
− | <code> | + | <code>svn://svn.reinvented.net/CharlottetownTransitMap/scripts</code> |
+ | |||
+ | or | ||
+ | |||
+ | <code>http://svn.reinvented.net/CharlottetownTransitMap/scripts</code> | ||
==Grab the Marker Images== | ==Grab the Marker Images== | ||
Line 27: | Line 35: | ||
==Install the Source== | ==Install the Source== | ||
− | Install the <code>CharlottetownTransitMap. | + | Install the <code>CharlottetownTransitMap.inc</code> file you check out into a web-accesible directory, and then modify the source to set the following: |
* <code>$mysql_host</code> - host name of your MySQL server | * <code>$mysql_host</code> - host name of your MySQL server | ||
Line 40: | Line 48: | ||
The route and schedule data -- information about intersections, routes, stops and schedule -- is kept four MySQL tables that you can grab a MySQL dump file for from the [[Subversion]] repository. You can check it out at: | The route and schedule data -- information about intersections, routes, stops and schedule -- is kept four MySQL tables that you can grab a MySQL dump file for from the [[Subversion]] repository. You can check it out at: | ||
− | <code> | + | <code>svn://svn.reinvented.net/CharlottetownTransitMap/routedata</code> |
+ | |||
+ | or | ||
+ | |||
+ | <code>http://svn.reinvented.net/CharlottetownTransitMap/routedata</code> | ||
==Import the MySQL Data== | ==Import the MySQL Data== | ||
Line 49: | Line 61: | ||
Substitute your own user name, password, host name and database name. The result should be four MySQL tables: routes, stops, schedule and intersections. | Substitute your own user name, password, host name and database name. The result should be four MySQL tables: routes, stops, schedule and intersections. | ||
− | |||
− | |||
− | |||
− |
Latest revision as of 10:43, 10 May 2007
The Charlottetown Transit Map is a PHP and JavaScript application that uses Google Maps to display up-to-the-minute information about the buses in Charlottetown. This is an unofficial project, not affiliated with the City of Charlottetown or the transit operator.
Contents
The Making Of
If you're interested in how I gathered the "raw data" for this application, read Making of the Charlottetown Transit Map.
Demonstration Page
There's a live working demo of the Charlottetown Transit Map at thebus.ca. This demo will always be running the latest version of the code.
System Requirements
- PHP-equipped webserver
- MySQL database server
- A Google Maps API Key
Browse the Source
You can use WebSVN to browse the source for this project.
Download the Source
The source code for the Charlottetown Transit Map is kept in a Subversion repository. You can check it out at:
svn://svn.reinvented.net/CharlottetownTransitMap/scripts
or
http://svn.reinvented.net/CharlottetownTransitMap/scripts
Grab the Marker Images
The map uses marker images from the Google Ride Finder map. You can grab these and make local copies from here: red, yellow, green. Put the images in a web-accessible place; you'll set the directory name later as $imagedir
.
Install the Source
Install the CharlottetownTransitMap.inc
file you check out into a web-accesible directory, and then modify the source to set the following:
-
$mysql_host
- host name of your MySQL server -
$mysql_user
- a MySQL user -
$mysql_passwd
- password for that MySQL user -
$mysql_database
- name of a MySQL database -
$GoogleAPIKey
- your Google Maps API Key -
$imagedir
- the base directory, web-accessible, where marker images are stored
Download the Route and Schedule Data
The route and schedule data -- information about intersections, routes, stops and schedule -- is kept four MySQL tables that you can grab a MySQL dump file for from the Subversion repository. You can check it out at:
svn://svn.reinvented.net/CharlottetownTransitMap/routedata
or
http://svn.reinvented.net/CharlottetownTransitMap/routedata
Import the MySQL Data
Once you have the chtown-transit-mysql.sql
file, you can simply:
mysql -u[user] -p[password] -h[hostname] [databasename] < chtown-transit-mysql.sql
Substitute your own user name, password, host name and database name. The result should be four MySQL tables: routes, stops, schedule and intersections.