You can create markers in my web application and create a route with google directions with those markers. But I want the user to be able to change the route aswell and i\'
This might be something that changed between sdleihssirhc's answer and now, but I tried the above solution and it kept failing on displayer.directions.route[0] saying it was undefined.
It looks like the attribute was changed to routes which took me a while to figure out. Using the line below works for me: 
var waypoints = displayer.directions.routes[0].legs[0].via_waypoint;
Hopefully that will save some time and frustration for anyone trying to get this to work.