Class GoogleDirections
Inheritance
Inherited Members
Namespace:GoogleMaps.Directions
Assembly:GoogleMaps.dll
Syntax
public class GoogleDirections : ExtenderControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IExtenderControl, IPostBackEventHandler
Properties
AvoidHighways
Gets or sets a value indicating whether [avoid highways]. If
true
directions will attempt to exclude highways when computing directions. Optional.
Note that directions may still include highways if there are no viable alternatives.
Declaration
[Browsable(true)]
public bool ? AvoidHighways { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
|
AvoidTolls
Gets or sets a value indicating whether [avoid tolls]. If
true
, instructs the Directions service to avoid toll roads where possible. Optional.
Declaration
[Browsable(true)]
public bool ? AvoidTolls { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
|
Destination
Location of destination. This can be specified as either a string to be geocoded or a LatLng. Required.
Declaration
[Browsable(true)]
public Location Destination { get; set; }
Property Value
Type | Description |
---|---|
Location | The destination. |
Draggable
Gets or sets a value indicating whether this GoogleDirections is draggable. If true, allows the user to drag and modify the paths of routes rendered by this DirectionsRenderer.
Declaration
[Browsable(true)]
public bool Draggable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
HideRouteList
Gets or sets a value indicating whether [hide route list]. This property indicates whether the renderer should provide UI to select amongst alternative routes. By default, this flag is false and a user-selectable list of routes will be shown in the directions' associated panel. To hide that list, set hideRouteList to true.
Declaration
[Browsable(true)]
public bool HideRouteList { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
MarkerOptions
Options for the markers. All markers rendered by the DirectionsRenderer will use these options.
Declaration
[Browsable(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public MarkerOptions MarkerOptions { get; set; }
Property Value
Type | Description |
---|---|
MarkerOptions | The marker options. |
OnClientChanged
Gets or sets the on client changed handler.
Declaration
public string OnClientChanged { get; set; }
Property Value
Type | Description |
---|---|
System.String | The on client changed. |
OptimizeWaypoints
Gets or sets a value indicating whether [optimize waypoints]. If set to true, the DirectionService will attempt to re-order the supplied intermediate waypoints to minimize overall cost of the route. If waypoints are optimized, inspect DirectionsRoute.waypoint_order in the response to determine the new ordering.
Declaration
[Browsable(true)]
public bool ? OptimizeWaypoints { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
|
Origin
Location of origin. This can be specified as either a string to be geocoded or a LatLng. Required.
Declaration
[Browsable(true)]
public Location Origin { get; set; }
Property Value
Type | Description |
---|---|
Location | The origin. |
PanelID
The <div> in which to display the directions steps.
Declaration
[Browsable(true)]
public string PanelID { get; set; }
Property Value
Type | Description |
---|---|
System.String | The panel. |
PolylineOptions
Options for the polylines. All polylines rendered by the DirectionsRenderer will use these options.
Declaration
[Browsable(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public PolylineOptions PolylineOptions { get; set; }
Property Value
Type | Description |
---|---|
PolylineOptions | The polyline options. |
PreserveViewport
Gets or sets a value indicating whether this GoogleDirections should alter the viewport. By default, the input map is centered and zoomed to the bounding box of this set of directions. If this option is set to true, the viewport is left unchanged, unless the map's center and zoom were never set.
Declaration
[Browsable(true)]
public bool PreserveViewport { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ProvideRouteAlternatives
Gets or sets a value indicating whether [provide route alternatives]. Whether or not route alternatives should be provided. Optional.
Declaration
[Browsable(true)]
public bool ? ProvideRouteAlternatives { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
|
Region
Region code used as a bias for geocoding requests. Optional.
Declaration
[Browsable(true)]
public string Region { get; set; }
Property Value
Type | Description |
---|---|
System.String | The region. |
RouteIndex
The index of the route within the DirectionsResult object. The default value is 0.
Declaration
[Browsable(true)]
public int RouteIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The index of the route. |
SuppressBicyclingLayer
Suppress the rendering of the BicyclingLayer when bicycling directions are requested.
Declaration
[Browsable(true)]
public bool ? SuppressBicyclingLayer { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> | The suppress bicycling layer. |
SuppressInfoWindows
Suppress the rendering of info windows.
Declaration
[Browsable(true)]
public bool ? SuppressInfoWindows { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> | The suppress info windows. |
SuppressMarkers
Suppress the rendering of markers.
Declaration
[Browsable(true)]
public bool ? SuppressMarkers { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> | The suppress markers. |
SuppressPolylines
Suppress the rendering of polylines
Declaration
[Browsable(true)]
public bool ? SuppressPolylines { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> | The suppress polylines. |
TravelMode
Gets or sets the travel mode. The mode of travel, such as driving (default) or walking. Note that if you specify walking directions, you will need to specify a <div> panel to hold a warning notice to users.
Declaration
[Browsable(true)]
public TravelMode TravelMode { get; set; }
Property Value
Type | Description |
---|---|
TravelMode | The travel mode. |
UnitSystem
Preferred unit system to use when displaying distance. Defaults to the unit system used in the country of origin.
Declaration
[Browsable(true)]
public UnitSystem? UnitSystem { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<UnitSystem> | The unit system. |
Methods
GetScriptDescriptors(Control)
When overridden in a derived class, registers the System.Web.UI.ScriptDescriptor objects for the control.
Declaration
protected override IEnumerable<ScriptDescriptor> GetScriptDescriptors(Control targetControl)
Parameters
Type | Name | Description |
---|---|---|
System.Web.UI.Control | targetControl | The server control to which the extender is associated. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Web.UI.ScriptDescriptor> | An enumeration of System.Web.UI.ScriptDescriptor objects. |
Overrides
GetScriptReferences()
When overridden in a derived class, registers the script libraries for the control.
Declaration
protected override IEnumerable<ScriptReference> GetScriptReferences()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Web.UI.ScriptReference> | An object that implements the System.Collections.IEnumerable interface and that contains ECMAScript (JavaScript) files that have been registered as embedded resources. |
Overrides
OnChanged(DirectionsChangedEventArgs)
Raises the Changed event.
Declaration
protected virtual void OnChanged(DirectionsChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DirectionsChangedEventArgs | e | The DirectionsChangedEventArgs instance containing the event data. |
RaisePostBackEvent(String)
When implemented by a class, enables a server control to process an evePnt raised when a form is posted to the server.
Declaration
public void RaisePostBackEvent(string eventArgument)
Parameters
Type | Name | Description |
---|---|---|
System.String | eventArgument | A System.String that represents an optional event argument to be passed to the event handler. |
Implements
Events
Changed
This server-side event is fired when the rendered directions change, either when a new DirectionsResult is set or when the user finishes dragging a change to the directions path.
Declaration
public event EventHandler<DirectionsChangedEventArgs> Changed
Event Type
Type | Description |
---|---|
System.EventHandler<DirectionsChangedEventArgs> |