I know you can programmaticaly add markers for directions on the map. But how do you let the user do that? Like on the Google maps site, you just right click and then click on 'directions from/to here' and the marker is added. This functionality seems to be absent from the API.
EDIT: Maybe I wasn't clear enough. I am not talking about the API functions. I just want to enable the user to get the directions menu that you get once you right click. Look at the the google maps site for reference.