Difference between revisions of "Charlottetown Transit Map"

From rukapedia
Jump to: navigation, search
 
(Updated with information about how to download and install application.)
Line 1: Line 1:
Placeholder for Charlottetown Transit Map information.
+
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.
 +
 
 +
==Demonstration Page==
 +
 
 +
There's a live working demo of the Charlottetown Transit Map at [http://ruk.ca/bus ruk.ca/bus].  This demo will always be running the latest version of the code.
 +
 
 +
==System Requirements==
 +
 
 +
* PHP-equipped webserver
 +
* MySQL database server
 +
* A [http://www.google.com/apis/maps/signup.html Google Maps API Key]
 +
 
 +
==Download the Source==
 +
 
 +
The source code for the Charlottetown Transit Map is kept in a [[Subversion]] repository.  You can check it out at:
 +
 
 +
<code>svn://svn.reinvented.net/CharlottetownTransitMap/</code>
 +
 
 +
==Grab the Marker Images==
 +
 
 +
The map uses marker images from the [http://labs.google.com/ridefinder Google Ride Finder] map.  You can grab these and make local copies from here: [http://labs.google.com/ridefinder/images/mm_20_red.png red], [http://labs.google.com/ridefinder/images/mm_20_yellow.png yellow], [http://labs.google.com/ridefinder/images/mm_20_green.png green].  Put the images in a web-accessible place; you'll set the directory name later as <code>$imagedir</code>.
 +
 
 +
==Install the Source==
 +
 
 +
Install the <code>CharlottetownTransitMap.php</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_user</code> - a MySQL user
 +
* <code>$mysql_passwd</code> - password for that MySQL user
 +
* <code>$mysql_database</code> - name of a MySQL database
 +
* <code>$GoogleAPIKey</code> - your [http://www.google.com/apis/maps/signup.html Google Maps API Key]
 +
* <code>$imagedir</code> - 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:
 +
 
 +
<code>svn://svn.reinvented.net/CharlottetownTransitData/</code>
 +
 
 +
==Import the MySQL Data==
 +
 
 +
Once you have the <code>chtown-transit-mysql.sql</code> file, you can simply:
 +
 
 +
<code>mysql -u[user] -p[password] -h[hostname] [databasename] &lt; chtown-transit-mysql.sql</code>
 +
 
 +
Substitute your own user name, password, host name and database name.  The result should be four MySQL tables: routes, stops, schedule and intersections.
 +
 
 +
==Testing==
 +
 
 +
Assuming all of the above went well, you should now be able to point your browser at the <code>CharlottetownTransitMap.php</code> page and see something that resembles [http://ruk.ca/bus this demo page].

Revision as of 11:26, 3 October 2005

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.

Demonstration Page

There's a live working demo of the Charlottetown Transit Map at ruk.ca/bus. This demo will always be running the latest version of the code.

System Requirements

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/

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.php 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/CharlottetownTransitData/

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.

Testing

Assuming all of the above went well, you should now be able to point your browser at the CharlottetownTransitMap.php page and see something that resembles this demo page.