I’m trying to graphically display a path/route on a browser for clients to see. For example, based on a txt or XML file, directions are included.
<route> <forward>4</forward> <left>90</left> <forward>5</forward> <left>90</left> <forward>2</forward> </route>
for a simple txt file equivalent.
In this example, the route would be to move forward 4 units, turn left 90 degrees, move forward again for 5 units, turn left 90 degrees and finish with moving 2 units forward.
Something like this. Arrow heads don’t have to be there, I just drew them on for clarity of direction. It will be even better if I can dynamically change the image, like being able to display the vehicle that is following this route, and perhaps even changing the color of route to green when the vehicle has followed and completed part of the route.
Learn How to Read
java– google search
MVCpattern, return the data objet to
Learn how to draw arrow using
<canvas>: see good reference