windowsforms-devexpress-dot-xtramap-2319c50b.md
An attribute that can be applied to map items.
Namespace : DevExpress.XtraMap
Assembly : DevExpress.XtraMap.v25.2.dll
NuGet Package : DevExpress.Win.Map
public class MapItemAttribute :
IMapItemAttribute,
ISupportObjectChanged
Public Class MapItemAttribute
Implements IMapItemAttribute,
ISupportObjectChanged
For more information, see Provide Data Using Vector Item Attributes.
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;
}
Private Function CreatePolygon(ByVal areaValue As Double, ByVal polygonName As String, ByVal points() As GeoPoint) As MapPolygon
Dim item As New MapPolygon()
item.Attributes.Add(New MapItemAttribute() With {.Name = areaValueAttrName, .Type = GetType(Double), .Value = areaValue})
item.Attributes.Add(New MapItemAttribute() With {.Name = polygonNameAttrName, .Type = GetType(String), .Value = polygonName})
item.ToolTipPattern = "{" & polygonNameAttrName & "}=<b>{" & areaValueAttrName & "}</b>"
For Each point As GeoPoint In points
item.Points.Add(point)
Next point
Return item
End Function
Object MapItemAttribute
See Also