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 MapPointMappingInfoBase.Latitude and MapPointMappingInfoBase.Longitude properties should be mapped to data object properties containing latitude and longitude data.


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.

See Also