I'm making a web app that makes what the title says, right now I have my bus stops and routes and I know how to add them to my map as markers and polylines respectively, I can also get the users current position and add a marker where they click on the map.
Now I need to know how to return the fastest route to get from current location to the desired destination, like google maps does, and I have no clue how to. Any help would be greatly appreciated.