want to highlight a route in a map for the city navigation application
i am preparing a city-map navigation mobile application in which i want to highlight a route to the user when he enters the two place's name. now, my problem is that i can find the places, but i am stuck at the part where i want to highlight the route between those two places.
can you please suggest some idea, so that i can use that in my开发者_JAVA百科 application. thnQ
What you need is a pathfinding algorithm to determine the path. If you want an efficient and pretty standard algorithm, there is an algorithm called A* for finding the best path between two places. It's a subject by itself.
Here is a nice tutorial to understand the algorithm: Link
And you can also google "a star pathfinding", and you'll find a lot on the subject.
精彩评论