Image and Viewport - Move, Drag, Pixel Positions etc

Dec 17 2007 2:30 AM
Hello everyone,

I need some help. I have been working on it for some time but havent been able to think of any solution. Even had thought of making do without it, even though it was a major part of my project. To be honest, I am a beginner and hence unawares about many of the stuff. So here is my problem:

I am working on a "PUBLIC TRANSPORT INFORMATION SYSTEM" (In India we dont have one yet for most cities). Currently I am doing it as part of my college project work, but I am interested in extending it further. Most of the stuff I have been able to do, but I am stuck at one point. I want to display the selected route between two places on the map. I want the map to be drag and move (like we have for pdf files). This is since the map of the city is extremely large (3 feet * 2 feet on paper, which I plan to scan. I may reduce the size a little, but not by much as I want the lanes and small roads to be visible with their names).

So, I want the following things to be done (in order of their priority). Please help me out, I really need it.

1> Firstly, I want the large image to be shown in a small viewport using drag and move so as to allow the user to wander through the whole map of the city.

A pic of what I mean is shown here:
http://www.geocities.com/this_is_shailesh/index.html

2> Secondly, I want to be able to move the viewport to a specific area of the map. For e.g., when the user selects a particular place on the map in a drop down list, I want the viewport to move to that part of my map which shows that location.

Currently, the only way I thought it could be done is by mapping the pixel positions for all the places in the drop down list and then moving the viewport such that the corresponding pixel position is the center of the viewport. But I admit, I really dont know how to implement this.

3> Finally, if its posible, is there any way by which I can highlight the selected paths.

My map will be static. So I was thinking on the lines of placing markers on all the stations (overlapping exactly on top), whose visibility can be adjusted on/off. When they are a part of the route, their visibility will be ON, and when not they will be OFF. The markers could be plain coloured circles, so that a series of dots (or circles) will indicate all the stops/stations along the selected path.

But this also I dont know how to implement in code. I have no clue how I can make these markers overlap the stations, esp coz the map will never be shows in its entirety at any time. I mean how do I do the pixel positioning with respect to the image rather than the viewport, which is what is generally done in case of pictureboxes etc.

So if anyone can help, I did be deeply indebted. In anyone knows of any precoded stuff or libraries i can make use of, please do inform. Or else, if you have any alternate suggestions for me, it would be great  as I am anyways not making much progress right now.

 Thanks a lot in advance. Waiting anxiously :-)