ListSourceDataAdapter Class
The data adapter that provides the means to bind the Map control to data.
Namespace: DevExpress.Xpf.Map
Assembly: DevExpress.Xpf.Map.v18.2.dll
Declaration
[ListSourceCustomBindingProperties]
public class ListSourceDataAdapter :
DataSourceAdapterBase
Example
To provide data from a list source.
- Create a
ListSourceDataAdapter
object and assign it to the VectorLayer.Data property. - Specify the DataSourceAdapterBase.DataSource property of the object.
- Specify mappings to data source fields to assign these field values to the adapter-generated map items. To do this, configure the ListSourceDataAdapter.Mappings property.
- Specify the settings of the adapter-generated map items. To do this, customize the ListSourceDataAdapter.ItemSettings property of the object.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-bind-a-map-control-to-a-datasource-e4679.
<dxm:VectorLayer.Data>
<dxm:ListSourceDataAdapter DataSource="{Binding Source={StaticResource data}, XPath=Ship}">
<dxm:ListSourceDataAdapter.AttributeMappings>
<dxm:MapItemAttributeMapping Name="Name" Member="Name"/>
<dxm:MapItemAttributeMapping Name="Year" Member="Year"/>
<dxm:MapItemAttributeMapping Name="Description" Member="Description"/>
</dxm:ListSourceDataAdapter.AttributeMappings>
<dxm:ListSourceDataAdapter.Mappings>
<dxm:MapItemMappingInfo Latitude="Latitude" Longitude="Longitude"/>
</dxm:ListSourceDataAdapter.Mappings>
<dxm:ListSourceDataAdapter.ItemSettings>
<dxm:MapCustomElementSettings ContentTemplate="{Binding Source={StaticResource itemTemplate}}"/>
</dxm:ListSourceDataAdapter.ItemSettings>
</dxm:ListSourceDataAdapter>
</dxm:VectorLayer.Data>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ListSourceDataAdapter class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
Inheritance
Extension Methods
See Also