Building a site

They have: 6 posts

Joined: Nov 2008

Hey,

I want to build a website which shows the bus routes for my city.

Example: They type the destination and the location from where they want to go and the website tells them how to reach the place and which bus to take.

How do I make such a site?

If this is the wrong place to ask please move the topic to its appropriate place.

greg's picture

He has: 1,581 posts

Joined: Nov 2005

How simple it is depends on a lot of things, mainly how large your city is and how many busses and routes there are etc.

Are you wanting to provide prices? This would require regular updating and checking prices if you want to remain accurate.
As of course would the routes, stops etc.

I wouldn't provide prices as they can change too frequently, but that's up to you

The data storing and user searching for bus numbers, stop names and stop locations and times for each stop for each bus is fairly easy to do with a database (eg PHP and MYSQL).,
Then it's a case of how you want to provide that data.

Will all this be textual? Which make it a simple case of storing all the relevant data and simply retrieving it as per the users search criteria.
Or are you wanting graphical, such as a city road map of some sort with the bus route shown?
That would be nice, but it gets a little more complex.

You would no doubt want to create an admin control panel, so you can easily edit bus numbers/times/stops/prices etc

What experience do you have? Can you code in anything? HTML/PHP/CSS etc

They have: 6 posts

Joined: Nov 2008

There are around 2500 buses in my city. The prices do not change regularly.

There are 4 types of buses Ordinary,Express,Deluxe and Super Deluxe.
Ordinary buses halt at all stops.
Express buses skip a few small ordinary stops.
Deluxe and super deluxe buses stop only at the major stops of a area.

Is it possible to show the route on Google Maps or wikimapia or something like that?

The user enters the beginning and end of a journey and the site must show him
1)The bus that will take him there
2)If he needs to change buses to get there.
If possible
3)Time taken to reach the destination (taking journey time and traffic into consideration)
4)Fare
5)Graphical representation of the route on Google Maps(The bus stops are listed on Gmaps)

I know HTML, I can figure out PHP but I don't know CSS. I can get help from people.

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

Have a look at this post on the topic at Google

You have three challenges:

1. Creating and maintaining the database of the bus routes.

2. Integrating the data with a display like Google maps

3. Integrating a UI for users to interact with the display/data

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Google Maps already provides directions using public transportation.

How do you calculate fares? Is it just by distance?

They have: 6 posts

Joined: Nov 2008

I can create and maintain the info as they don't change frequently.
I first need to get some textual results before integrating it into Google maps.

That post is extremely complex do I have to go through the same? If it is unavoidable I will do it but that would take ages.

They have: 6 posts

Joined: Nov 2008

Drawing lines on Google Maps is a really tedious process isn't there a simpler way?

Gmaps only provides info on transit in select countries. That's no use for me.

Alright if I were to scrape the idea of providing a graphical representation and only give a textual route how do I do it?

greg's picture

He has: 1,581 posts

Joined: Nov 2005

For the maps, you can use google maps. They have api's which would allow you to manipulte their maps.

http://code.google.com/apis/maps/

To draw on the maps to mark a road from one point to another you would use polylines.

To highlight all the stops on a route you could use the markers
http://code.google.com/apis/maps/documentation/examples/map-markers.html

They have: 6 posts

Joined: Nov 2008

I thank you all for your time but I don't think 1 person can do this in his spare time so I think I should scrape the idea.

greg's picture

He has: 1,581 posts

Joined: Nov 2005

It's not something you will do in a hurry, that's for sure.
how long it would take would depend on your skills, how much detail you want to have etc

If it's something you are wanting to do, don't give up at the first sign of it requiring some thought and perhaps a little more dedication that you first anticipated.

The first parts of a website, the designing on paper and thinking about how it will work, is often the trickiest part.
Once you have figured out all the ideas, functions and features you are going to do, it is often simple enough to get them together in a working site

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.