Skip to main content

BingElevationDataProvider Class

Provides the capability to obtain elevation data from the Bing Maps web service.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map

Declaration

public class BingElevationDataProvider :
    BingMapDataProviderBase,
    IMouseClickRequestSender

Example

This example demonstrates how to receive elevation data from the Bing Map Service.

Important

On May 21, 2024, Microsoft announced that Bing Maps for Enterprise and its API will be discontinued. Azure Maps will be a single unified enterprise mapping platform available from Microsoft.

We are working on API compatible with Azure Maps and expect to ship it with our next major release (v24.2).

If you have an existing license to Bing Maps for Enterprise, you can continue using our existing API. You need to transition to new API until June 30, 2025 (free and basic license) or until June 30, 2028 (enterprise license).

The last date you can get a new license to Bing Maps for Enterprise is June 30, 2025. If you do not have an existing license after that date, you would not be able to use our map controls with Bing Maps or Azure Maps (until we release the new API). During that time, you can use other map providers supported by our controls, such as OpenStreetMap.

To do this, request the required elevation information using the BingElevationDataProvider.RequestPointsElevations method.

<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:BingElevationDataWpf"
        xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map" x:Class="BingElevationDataWpf.MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525" Loaded="OnLoaded">
    <Grid>

        <dxm:MapControl ZoomLevel="3" FontSize="7">
            <dxm:MapControl.CenterPoint>
                <dxm:GeoPoint Longitude="-100" Latitude="30"/>
            </dxm:MapControl.CenterPoint>
            <dxm:ImageLayer>
                <dxm:BingMapDataProvider BingKey="INSERT_YOUR_BING_KEY"/>
            </dxm:ImageLayer>
            <dxm:InformationLayer>
                <dxm:BingElevationDataProvider x:Name="provider" BingKey="INSERT_YOUR_BING_KEY"/>
            </dxm:InformationLayer>
        </dxm:MapControl>
    </Grid>
</Window>
See Also