There is nothing in the API to show the "Directions from here" and "Directions here" context menus; you will need to create this functionality yourself.
You can handle the * rightclick * event on the map object to get clicks on the context (and its associated location), and then go through the locations in the Directions Service .
NB It is currently recommended that you use the version 3 API for Google Maps (Directions Service) rather than the version 2 API proposed in the previous answer (GDirections).
source
share