MapItemsLayerBase.ItemImageIndex Property
Gets or sets the index of the image assigned to the map item.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v19.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Int32 | -1 | An integer which specifies the index of the map item’s image in a collection of images. |
Example
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-customize-mini-map-layers-t201418
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;
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ItemImageIndex property.
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.
See Also