ListSourceDataAdapter.DefaultMapItemType Property

Specifies the type of map items to be used by default when generating items from a data source.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v20.1.dll

Declaration

[DefaultValue(MapItemType.Unknown)]
public MapItemType DefaultMapItemType { get; set; }
<DefaultValue(MapItemType.Unknown)>
Public Property DefaultMapItemType As MapItemType

Property Value

Type Default Description
MapItemType

Unknown

A MapItemType enumeration value.

Remarks

For more information about using the ListSourceDataAdapter class, refer to Providing Data.

Examples

    mapControl.Layers.Add(CreateVectorLayer(data));
LayerBase CreateVectorLayer(object data) {
    ListSourceDataAdapter adapter = new ListSourceDataAdapter() {
        DataSource = data,
        DefaultMapItemType = MapItemType.Custom
    };
    adapter.Mappings.Latitude = "Latitude";
    adapter.Mappings.Longitude = "Longitude";

    adapter.AttributeMappings.Add(new MapItemAttributeMapping() {Name = "Name", Member = "Name"});
    adapter.AttributeMappings.Add(new MapItemAttributeMapping() {Name = "Year", Member = "Year"});
    adapter.AttributeMappings.Add(new MapItemAttributeMapping() {Name = "Description", Member = "Description"});

    VectorItemsLayer layer = new VectorItemsLayer() {
        Data = adapter,
        ItemImageIndex = 0,
        EnableSelection = false,
        EnableHighlighting = false,
        ToolTipPattern = "<b>{Name} ({Year})</b>\n{Description}"
    };
    return layer;
}
See Also