[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [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]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Collapse]Map Control
   [Collapse]Getting Started
     Lesson 1 - Connect to the Images Provider
     Lesson 2 - Load a Vector Cartesian Map
     Lesson 3 - Add Analytical Data to a Geographical Map
   [Expand]Coordinate Systems
   [Expand]Map Image Data
   [Expand]GIS Data
   [Expand]Vector Data
   [Expand]Visual Elements
   [Expand]End-User Features
   [Expand]Product Information
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst 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]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Lesson 1 - Connect to the Images Provider

This is the first tutorial in the Getting Started series for the WinForms Map control and guides you through the process of creating a simple map application that displays the map.

This tutorial consists of the following steps:

Expanded Step 1. Add a Map Control

In this step, you are performing the common actions required to add a Map control to your application.

  • Run MS Visual Studio 2012, 2013, 2015, 2017 or 2019.
  • Create a new Windows Forms Application project by selecting File | New | Project... in the main menu of Visual Studio, and in the invoked New Project menu, select Windows Forms Application.
  • Add the MapControl component to your project.

    To do this, locate the MapControl item in the Toolbox in the DX.19.2: Data & Analytics tab and drop it onto the form.

  • Click the Map control's smart tag to invoke its actions list. In the Actions list, clicking the Dock in Parent Container link allows the Map control to occupy all of the available space on the form.

  • After docking the Map control, it appears as follows:

  • Sometimes, you may need to show a specific area on a map. To do this, set the required value to the MapControl.CenterPoint property.

    For example, set the MapControl.CenterPoint property value to 45,18. When an image layer is added to a MapControl, Europe is in the center of the map.

  • To specify the current zoom level for all map layers, use the MapControl.ZoomLevel property (set its value to 4).

You have now added a Map control to your application. In the next section, it describes how to connect this control to an image tiles data provider.

Expanded Step 2. Connect to an Images Provider

The Map control can display multiple Layers to draw images or vector elements. To load images from a certain image provider, use the ImageLayer object. It is necessary to draw the map.

In this lesson, the Bing Maps image tiles provider is used.


It is possible to use the OpenStreetMap image tiles provider, the WMS provider, or to load image tiles from the local directory. Refer to the following topics for more information:

The Map control provides two ways of connecting to the Bing Maps provider: manual and automatic. Here they are in greater detail:

Manually Connect to the Bing Maps Provider

You can add an image layer and bind it to the Bing Maps service by performing the following steps:

  • Select the Click here to add layer link on the MapControl surface.
  • Locate the Image Layer item in the invoked list.
  • Select the Connect to Bing Maps item to obtain map images from the Bing Maps service for the layer.

Automatically Connect to the Bing Maps Provider

  • Connect to the Bing Maps data provider using the Connect to Bing Maps link in the map's smart tag tasks, as shown below. This allows you to connect to the map control automatically.


Refer to How to: Get a Bing Maps Key if you run the application and see a window with the following error message: "The specified Bing Maps key is invalid. To create a developer account, refer to https://www.microsoft.com/en-us/maps/create-a-bing-maps-key".

Expanded Step 3. Customize an Images Provider

The BingMapDataProvider object should be configured before use by doing the following:

Expanded Step 4. Adding a Mini Map

Sometimes, you may need to show a Mini Map. For this, do the following:

Map control customization is complete.

Expanded Result

Run the application to see the result.


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

Expanded See Also

Is this topic helpful?​​​​​​​