VERouteOptions Class

You are not viewing the latest version of the AJAX control. Bing Maps AJAX V7 is the recommended JavaScript control for Bing Maps. If you need this documentation, it is available in as a CHM or PDF download.

Contains additional options to customize the returned route.

Constructor

Name Description

VERouteOptions Constructor

Initializes a new instance of the VERouteOptions Class.

Public Properties

Name Description

VERouteOptions.DistanceUnit Property

A VERouteDistanceUnit Enumeration value specifying the units used for the route. The default value is VERouteDistanceUnit.Mile.

VERouteOptions.DrawRoute Property

A Boolean value specifying whether the route is drawn on the map. The default value is true, which means the route is drawn on the map.

VERouteOptions.RouteCallback Property

The name of the function called when the method has generated the route. Optional. The default value is . The called function receives a VERoute Class object.

VERouteOptions.RouteColor Property

The VEColor Class object specifying the color of the route line. The default value is default is VEColor(0,169,235,0.7).

VERouteOptions.RouteMode Property

A VERouteMode Enumeration value specifying the mode of route to return. The default value is VERouteMode.Driving.

VERouteOptions.RouteOptimize Property

A VERouteOptimize Enumeration value specifying how the route is optimized. The default value is VERouteOptimize.MinimizeTime.

VERouteOptions.RouteWeight Property

The thickness, in pixels, of the route line. The default value is 6 pixels.

VERouteOptions.RouteZIndex Property

The z-index of the route line. The default value is 4.

VERouteOptions.SetBestMapView Property

A Boolean value specifying whether the map view is set to the best view of the route after it is drawn. The default is true, which means that the map view is set.

VERouteOptions.ShowDisambiguation Property

A Boolean value specifying whether a disambiguation dialog box is shown. Optional. The default value is true, which means the disambiguation dialog box is shown. If false, no disambiguation dialogs are displayed and the route uses the first geocoded response for each location.

VERouteOptions.ShowErrorMessages Property

Whether to show any error messages. The default value is true.

VERouteOptions.UseMWS Property

> [!IMPORTANT] > The MapPoint Web Service has been retired, so a Bing Maps route will be returned regardless of whether the UseMWS property is set to true.

A Boolean value specifying whether to use the MapPoint Web Service to generate the route. The default value is false.

VERouteOptions.UseTraffic Property

A Boolean value specifying whether to calculate the route using traffic information. The default value is false.

See Also

Reference

VEMap.GetDirections Method