i am trying compelete my project for college i am assigned to develop a businfo map in java and being a beginner in java i am completely lost in it. i am trying to use map images to show the paths and locations as start and destination. we should be able to zoom in the map to see details clearly.the path of the bus is show as the moving dotted lines or just lines. the main thing is that we should be able to find the correct bus path even if the search location lies anywhere in between the bus path.

so i hope to get some suggestion on this project, mainly how to start, which packages are good to use for such projects , and general logic to develop argorithm for the project.

What kind of programming experience do you have? This sounds like an advanced project.
A question:
How are you going to compute the coordinates of the bus on an image of a map to keep the bus on the route? A solution: create a special program to save the x,y locations of the mouse as it moves over the map and manually move the mouse over a route and save those coordinates.

You'll also need the scale of the map to be able to show correct bus speed.

Edited 6 Years Ago by NormR1: n/a

I'm having a hard time understanding what you want to do, in detail, but it does sound like a complex problem any way I try to understand it.
Are you trying to do something to find a bus route from point A to point B? (ie, I'm at 3 Main Street and I want to get to 27 Elm Street, what's the best bus to take)
Or do you want to display the path that a given route takes? (ie, I know I'm taking the #77 bus, and I want to see on a map where i'll be going)

Or is it something else? In any case, you'll probably want to start by doing a simpler case that has some fraction of th functionality, and building that out.

my major programming language is c++ and i am good at it. i am 3rd year student and as a college project i am not supposed to go into that much of details i am supposed to show the path and locations as source and destination for a particular bus route in a map. the main problem i'm having is searching for packages which could ease my work and using the zooming effects on the map.

I'm having a hard time understanding what you want to do, in detail, but it does sound like a complex problem any way I try to understand it.
Are you trying to do something to find a bus route from point A to point B? (ie, I'm at 3 Main Street and I want to get to 27 Elm Street, what's the best bus to take)
Or do you want to display the path that a given route takes? (ie, I know I'm taking the #77 bus, and I want to see on a map where i'll be going)

Or is it something else? In any case, you'll probably want to start by doing a simpler case that has some fraction of th functionality, and building that out.

ya that's exactly what i am trying to do

So you're trying to find a bus route from two locations selected by the user?
Should we assume you've got the underlying model of the bus routes and you just want help with rendering? Or were you just going to hope that the model part would be easy? Where are we starting from, and what sort of help are you looking for?

Edited 6 Years Ago by jon.kiparsky: n/a

i am using database to store all the bus and bus route information searching is of no problem. major problem i am facing is in locating the bus stops or locations searched by users in map image.

major problem i am facing is in locating the bus stops or locations searched by users in map image

Have you ever looked at <AREA tag in HTML?
To map the pixels in the map image to locations, you'll need to write a mouse listener program that you use to track over the image and save the x,y positions that correspond to map locations. See my first post.

One way to do it. This assumes a static map, but you can extend it to scrollable by using offsets. Make a two-dimensional array of Locations (bus stops, landmarks, etc). Use the x,y location of a mouse click, scaled appropriately, as the pair of indexes into the array.

This has some real problems. What are they, and can they be fixed?

Are you sure a database lookup is the best way to handle the bus route info? This sounds more like a graph problem. How are you going to handle, say, trips that require transfers? Multiple possible combinations of transfers?

(I'm now assuming that you know the basics of Swing, and that you're interested in the algorithms, not the details of how to code it)

This article has been dead for over six months. Start a new discussion instead.