Skip to main content

BingRouteOptions Class

Contains settings that define the parameters for calculating a route via the Microsoft Bing service.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.1.dll

NuGet Package: DevExpress.Win.Map

Declaration

public class BingRouteOptions :
    MapNotificationOptions

The following members return BingRouteOptions objects:

Remarks

An object of BingRouteOptions class can be accessed using the BingRouteDataProvider.RouteOptions property.

Bing Route options are represented by the BingRouteOptions object that can be accessed via the BingRouteDataProvider.RouteOptions property.

Then, you can specify the calculated route mode (BingRouteOptions.Mode), the route optimization option (BingRouteOptions.RouteOptimization) and the distance unit (BingRouteOptions.DistanceUnit).

Example

View Example

    cbeTravelMode.Properties.Items.AddRange(Enum.GetValues(typeof(BingTravelMode)));
    cbeTravelMode.SelectedIndex = 0;
    cbeRouteOptimization.Properties.Items.AddRange(Enum.GetValues(typeof(BingRouteOptimization)));
    cbeRouteOptimization.SelectedIndex = 0;
private void OnTravelModeSelectedIndexChanged(object sender, EventArgs e) {
    routeProvider.RouteOptions.Mode = (BingTravelMode)cbeTravelMode.SelectedItem;
}

private void OnRouteOptimizationSelectedIndexChanged(object sender, EventArgs e) {
    routeProvider.RouteOptions.RouteOptimization = (BingRouteOptimization)cbeRouteOptimization.SelectedItem;
}
See Also