Click here to Skip to main content
15,867,835 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi all,

Can anyone please tell me how to 'display' a path between two points in an interactive map? I mean, the shortest path between two user selected points will be taken using Djisktra's algorithm. But how can I actually display it in the map?

Thank you very much for your help.
Posted
Updated 10-Mar-10 9:40am
v2

1 solution

Hi do you want a algorithm to find shortest parth between two points? Or you want to draw in you map or something.? Please clarify what exactly you want.

If you want algorithm then try this http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm[^]

And If you have your algorithm then you need to store the different verticies (i mean places or city or state or country) and edges with their weight (i.e. distance between two different places) Then you can apply that algorithm to you map.

If want some specific info please elaborate it further.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900