Charlottetown Bus + Google Maps

Peter Rukavina
The code described here has been moved into Subversion.
Details and installation instructions.

I don’t read printed bus timetables very well. So I created the Charlottetown Transit Interactive Bus Map:

Interactive Charlottetown Transit Map Screen Shot

This is a little Google Maps hack that uses PHP and JavaScript to display information about Charlottetown bus routes and schedules.

This is just a tentative first go; specifically:

  • Only the Winsloe - University Ave. line is included (it’s the only one in operation as I write).
  • Stop and route location may be incorrect; I simply recreated this as best I could from the published schedules and maps. If you find problems, please let me know.
  • I left out the early morning and early evening swings to the Garfield St. terminal.
  • Assumes a Big Browser Window (map is 700 pixels wide); future versions should be more flexible.
  • No allowance made for the fact that there are no buses on Sundays.
  • Doesn’t span days — after the transit day is over, all times display as “n/a”.

You’re welcome to grab the source and the data and improve. [[Steven]] says I need a source code repository for all my little code experiments; expect this soon.

It goes without saying that this project is unaffiliated with the City of Charlottetown or the transit operator; if it breaks, or sends you to the wrong place at the wrong time, it’s my fault, not theirs.

Comments

Submitted by DerekMac on

Permalink

Cool! I hope the City runs with this and incorporates it into their website. Next step would be for each bus to have a GPS, and transmit real-time location coordinates, so that the map could display where the bus/trolleys actually are.

Off to look out the window to see if the bus actually shows up in front of my building at 08:18!

Submitted by Peter Rukavina on

Permalink

A little more live tweaking made things shaky for ~15 minutes, but we’re back. 9:54 a.m. bus just drove by (I heard the trolley bell, just like Mr. Rogers Neighbourhood).

Submitted by Greg on

Permalink

Hi Peter,
Nice work on the map. Although I am not seeing the stops coming up. I am testing with the Google Maps as well, hwo are you geocoding the points on the map? Any program or website you are using to get the coordinates?

Thanks

Submitted by Andrew on

Permalink

Is it possible to add the option of Map, Satellite, and Hybrid to the top right of the map like regular google maps does?

Submitted by Peter Rukavina on

Permalink

Andrew: I’m reluctant to add this because of the poor registration between the map layer and the satellite layer in Google Maps’ layers for Charlottetown. I’ve registered the bus routes against the map layer.

Submitted by Ryan Palmer on

Permalink

Peter,

Nice work on the transit map. Thanks to your efforts I was able to create a couple of database-fed slides for the campus information system thing here at UPEI (Campus Screens Project).

It’s a pretty recent addition to the project, so it’s still pretty rough, but you can check it out here:

http://transit.upeiism.org/render.php?size=50&activestop=7&activeroute=1

Let us know what you think!

Cheers,

Ryan

Submitted by Bob Bourne on

Permalink

Peter:
I am a transit consultant specializing in small bus systems and I have been examining the parameters of the proposed transit study. Is there a person that I could communicate with regarding the current service and who will also be able to answer some questions about the community?

Thanks,
Bob Bourne
Ames, Iowa

Submitted by danny on

Permalink

great map and system. is there a code or program that can be used offline for people who dont have internet so that they can use the map info.

Submitted by Peter Rukavina on

Permalink

There’s no code to allow for offline usage, but it’s conceivable that you could grab the MySQL data and craft your own.

Submitted by Dean on

Permalink

Very interesting use of Google Maps.

thanks for sharing your ideas / process on this.

Dean
UK

Add new comment

Plain text

  • Allowed HTML tags: <b> <i> <em> <strong> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). You can subscribe to an RSS feed of posts, an RSS feed of comments, or receive a daily digests of posts by email.

Search