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.v26.1.dll
NuGet Package: DevExpress.Win.Map
Declaration
Property Value
| Type | Default | Description |
|---|---|---|
| MapItemType | Unknown | A MapItemType enumeration value. |
Available values:
Show 14 items
| Name | Description |
|---|---|
| Unknown | Represents an unknown map item type. |
| Dot | Represents a map dot. |
| Ellipse | Represents a map ellipse. |
| Line | Represents a map line. |
| Path | Represents a map path. |
| Polygon | Represents a map polygon. |
| Polyline | Represents a map polyline. |
| Rectangle | Represents a map rectangle. |
| Pushpin | Represents a map pushpin. |
| Custom | Represents a map custom element. |
| Callout | Represents a map callout. |
| Bubble | Represents a Bubble chart. |
| Pie | Represents a Pie chart. |
| Spline | Represents a map spline. |
Example
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