Back to Devexpress

BingMapDataProvider.TopLayer Property

wpf-devexpress-dot-xpf-dot-map-dot-bingmapdataprovider-5d6d2af3.md

latest3.0 KB
Original Source

BingMapDataProvider.TopLayer Property

Gets or sets the display layer that is rendered over the imagery set received from the Bing Maps service.

Namespace : DevExpress.Xpf.Map

Assembly : DevExpress.Xpf.Map.v25.2.dll

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public BingMapTopLayer TopLayer { get; set; }
vb
Public Property TopLayer As BingMapTopLayer

Property Value

TypeDescription
BingMapTopLayer

A value that specifies a layer that is displayed over the imagery set received from the Bing Maps service. The default value is BaseMap.

|

Available values:

NameDescriptionImage
BaseMap

The layer that displays the regular road map with labels.

|

| | Background |

The layer that displays base geometry without labels.

|

| | Foreground |

The layer that displays only labels on the map.

|

| | TrafficFlow |

The layer that displays traffic flow.

|

|

Remarks

The following code renders the Traffic Flow layer of Bing Maps. Note if the BingMapDataProvider.Kind property is set to BingMapKind.Hybrid , the map is displayed with labels regardless of the display layer type.

xaml
<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:MapExample"
        xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map" x:Class="MapExample.MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <dxm:MapControl>
            <dxm:ImageLayer>
                <dxm:BingMapDataProvider BingKey="Insert your Bing key."
                                         Kind="RoadLight"
                                         TopLayer="TrafficFlow"/>
            </dxm:ImageLayer>
        </dxm:MapControl>
    </Grid>
</Window>

See Also

BingMapDataProvider Class

BingMapDataProvider Members

DevExpress.Xpf.Map Namespace