Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Collapse]Map Control
   [Expand]Getting Started
    Layers
   [Expand]Coordinate Systems
   [Expand]Map Image Data
   [Collapse]GIS Data
     Search
     Geocode
     Routing
     Elevation
   [Expand]Vector Data
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]End-User Features
   [Expand]Product Information
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Elevation

This document explains how to provide a Map control with the capability to obtain elevation information of a location on a map.

The document consists of the following sections.

Expanded Overview

The Map control supports the Microsoft Bing Elevation service, allowing you to embed elevation requesting functionality to your map. When this feature is enabled, you can click on the map and obtain elevation information from the service.

The search functionality in the map control is performed by the Bing Search data provider. This provider is represented by the BingElevationDataProvider object. The section below explains how to use the BingElevationDataProvider in the map control.

Expanded Enabling Elevation Requesting

To enable elevation requesting in the Map control, do the following.

The code snippet below shows how this can be done.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T378717.

Expanded Using a Custom UI

The Map control provides the elevation request functionality for several points. Using this approach, you can build a custom request panel to get additional results from the Microsoft Bing Elevation service.

To send an elevation request, call the BingElevationDataProvider.RequestPointElevation or BingElevationDataProvider.RequestPointsElevations method.

For instance, you have a UI that consists of 2 text boxes named "tbLatitude", "tbLongitude", and a button named "Request Elevation". To send a request, click the button. This calls the RequestPointElevation method.

Expanded Processing Elevation Request Result

To get the results for the request, handle the BingElevationDataProvider.ElevationsCalculated event, as shown below.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T378717.

In the code above, the ElevationsCalculatedEventArgs.Result property is used to obtain the request results. The ElevationRequestResult.Locations property stores the elevation data for the points that had be sent in the request.

How would you rate this topic?​​​​​​​