BingRouteDataProvider.RouteOptions Property

Provides access to the options that define how to calculate a route.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v20.1.dll

Declaration

public BingRouteOptions RouteOptions { get; set; }
Public Property RouteOptions As BingRouteOptions

Property Value

Type Description
BingRouteOptions

A BingRouteOptions object.

Examples

This example demonstrates how to customize route calculation options.

<ObjectDataProvider x:Key="BingTravelModeValues" 
                    ObjectType="{x:Type sys:Enum}" MethodName="GetValues">
    <ObjectDataProvider.MethodParameters>
        <x:Type TypeName="dxm:BingTravelMode"/>
    </ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ObjectDataProvider x:Key="RouteOptimizationValues" 
                    ObjectType="{x:Type sys:Enum}" MethodName="GetValues">
    <ObjectDataProvider.MethodParameters>
        <x:Type TypeName="dxm:BingRouteOptimization"/>
    </ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
    <dxm:InformationLayer EnableHighlighting="False" EnableSelection="False">
        <dxm:InformationLayer.DataProvider>
            <dxm:BingRouteDataProvider x:Name="routeProvider" 
                BingKey="{Binding Source={StaticResource bingKey}}"
                RouteCalculated="routeDataProvider_RouteCalculated">
                <dxm:BingRouteDataProvider.RouteStrokeStyle>
                    <dxm:StrokeStyle Thickness="10" DashCap="Round" 
                                     StartLineCap="Round" EndLineCap="Round" />
                </dxm:BingRouteDataProvider.RouteStrokeStyle>
                <dxm:BingRouteDataProvider.RouteOptions>
                    <dxm:BingRouteOptions 
                        Mode="{Binding ElementName=lbMode, Path=SelectedValue}"
                        RouteOptimization="{Binding ElementName=lbRouteOptimization, Path=SelectedValue}"/>
                </dxm:BingRouteDataProvider.RouteOptions>
            </dxm:BingRouteDataProvider>
        </dxm:InformationLayer.DataProvider>
    </dxm:InformationLayer>
        <ListBox x:Name="lbMode" Margin="4,2,4,2" SelectedIndex="0" 
                      ItemsSource="{Binding Source={StaticResource BingTravelModeValues}}"/>
        <ListBox x:Name="lbRouteOptimization" Margin="4,2,4,2" SelectedIndex="0" 
                      ItemsSource="{Binding Source={StaticResource RouteOptimizationValues}}"/>
See Also