Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

MapItemAttribute Class

An attribute that can be applied to map items.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

NuGet Package: DevExpress.Win.Map

#Declaration

public class MapItemAttribute :
    IMapItemAttribute,
    ISupportObjectChanged

#Remarks

For more information, see Provide Data Using Vector Item Attributes.

#Example

private MapPolygon CreatePolygon(double areaValue, string polygonName, GeoPoint[] points) {
    MapPolygon item = new MapPolygon();

    item.Attributes.Add(new MapItemAttribute() {
        Name = areaValueAttrName,
        Type = typeof(double),
        Value = areaValue
    });
    item.Attributes.Add(new MapItemAttribute() {
        Name = polygonNameAttrName,
        Type = typeof(string),
        Value = polygonName
    });

    item.ToolTipPattern = "{" + polygonNameAttrName + "}=<b>{" + areaValueAttrName + "}</b>";

    foreach (GeoPoint point in points) {
        item.Points.Add(point);
    }

    return item;
}

#Inheritance

Object
MapItemAttribute
See Also