In a earlier article we have gone through how to draw directions between two locations. In this article we will learn how to make directions draggable using Google Maps v3.
Google Maps v3 allows the directions to be draggable by setting draggable property of the renderer to true. This allows user to modify cycling, walking or driving directions displayed using a DirectionsRenderer dynamically, permitting a user to select and alter routes by clicking and dragging the resulting paths on the map. Transit directions cannot be made draggable.
In earlier tutorials, we have learnt the basics of google maps and looked through examples like creating a store locator. In this tutorial, we will learn how to Draw directions between two locations using google maps v3. Google Maps api provides a DirectionService which allows to calculate directions. Directions Service receives direction requests and returns computed results. We may either handle these directions results yourself or use the DirectionsRenderer object to render these results.