For an exercise/project in PHP, I have to program a route (with progression), but without being precise to the streets to be borrowed (as we know on GPS) but with lines between two points. Example: example route
The additional difficulty is to be able to display the progress on the line, starting from a percentage, the goal is therefore to have an image (like car, man or bicycle) on the straight line. I have already worked with leaflet.js, but if another library is more appropriate I am taker.
I use this for the moment, for the points (Departure and arrival):
function placeMarkerDepartureArrival() {
// Departure
L.marker([varGPS[0].lat, varGPS[0].lng], {icon:myIconAD}).addTo(map);
// Arrival
L.marker([varGPS[1].lat, varGPS[1].lng], {icon:myIconAD}).addTo(map);
}
If you have any examples or site, I am taker.