Support route preview while dragging the marker

Please let me know if there is anything that could be improved. I'm rather new to JavaScript-land.