[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Collapse]Map Control
   [Expand]Getting Started
    Layers
   [Expand]Coordinate Systems
   [Expand]Map Image Data
   [Expand]GIS Data
   [Collapse]Vector Data
    [Collapse]Providing Data
     [Expand]Add Vector Items Manually
     [Expand]Load Vector Items from Vector Format Source
      Generate Vector Items Automatically
      Generate Chart Items Automatically
      Provide Data Using Vector Item Attributes
     Colorizers
     Clusterers
   [Expand]Visual Elements
   [Expand]End-User Interaction
   [Expand]Examples
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Generate Vector Items Automatically

The map control allows you to provide vector items from lists and list sources of objects. To do this, create an instance of the ListSourceDataAdapter class and assign it to the VectorLayer.Data property. Then, assign a list of data objects to its DataSourceAdapterBase.DataSource property.

Then, it is necessary to specify the data object properties that are used to generate vector items. To provide this information, use a MapItemMappingInfo object returned by the ListSourceDataAdapter.Mappings property. The MapItemMappingInfoBase.Latitude and MapItemMappingInfoBase.Longitude properties should be mapped to data object properties containing latitude and longitude data.

Note

If you need to provide additional information for generated vector items (e.g., to display this information in tooltips), specify it using the DataSourceAdapterBase.AttributeMappings property of ListSourceDataAdapter. For detailed information, refer to Provide Data Using Vector Item Attributes.

The following image shows the result of binding to data using the ListSourceDataAdapter.

To learn more on how to bind data using the ListSourceDataAdapter class, refer to How to: Automatically Generate Vector Items from a Datasource.

Expanded See Also

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