If we do not want to autogenerate GDirection, and we prefer to design a more personal interface, set "autoGenerate" to false.
GMaps still does most of the work. All we have to do is set the boxes for start and end points, the submit button, and "div" where the directions will go.
In addition, define "locale" to indicate Language-Culture in which we want to work.
Define the following properties for correct operation:
- buttonElementId: The button ID. Input must be "< type=button/>" NOT "< asp:Button/>".
- fromElementId: The Textbox that corresponds to the starting point.
- toElementId: The Textbox that corresponds to the ending point.
- divElementId: The div ID where the directions will go.
- locale: string that defines the culture. For example "Es-ES", "in-GB", "fr-CA", etc.
- travelMode: The mode of travel, such as driving (default) or walking.
- avoidHighways: If true directions will attempt to exclude highways when computing directions. Note that directions may still include highways if there are no available alternatives.
- preserveViewport: By default, when a Directions object has a map, the map is centered and zoomed to the bounding box of the the directions result. When this option is set to true, the viewport is left as is (unless it was never set in the first place).