Back to Devexpress

Lesson 3 - Add Analytical Data to a Geographical Map

windowsforms-17682-controls-and-libraries-map-control-getting-started-lesson-3-add-analytical-data-to-a-geographical-map.md

latest6.5 KB
Original Source

Lesson 3 - Add Analytical Data to a Geographical Map

  • Jul 02, 2025
  • 4 minutes to read

The Map control can visualize data bound to geographical coordinates from various data sources (a database, an XML file, a list of records, etc.). This tutorial describes the steps required to create Pie charts on the map surface using data stored in an external XML file. This XML data file contains Olympic Games medal information.

To bind a map control to an XML data source, follow the instructions below:

Step 1. Add a Map Control

Step 2. Prepare a Vector Items Layer and Load Data

  • Add an empty VectorItemsLayer to the Map’s MapControl.Layers collection as follows:

  • To bind a data source to this layer, run the Data Source Wizard , as shown in the following image:

  • On the first Data Source Configuration Wizard page, set a data adapter as PieChartDataAdapter that allows the vector layer to generate Pie chart items. Then, click Next.

  • In the list of available technologies, select the XML Data item. Then, click Next.

  • On the next page, select the Loading a DataSet from XML item. Then, click Next.

  • On the final Data Source Configuration Wizard page, do the following:

Step 3. Configure Pie Chart Items

Step 4. Prepare a Colorizer

The next step is the Colorizer customization. For this, do the following:

The application should look like this if it is launched now :

Step 5. Add Legends

To add legends to the application, do the following:

Result

Run the application to see the results.

See Also

How to: Manually Generate Vector Items

How to: Automatically Generate Vector Items from a Datasource

How to: Automatically Generate Bubble Charts Items from a Datasource

How to: Automatically Generate Pie Charts Items from a Datasource