Files to look at:
How to create a map item attribute and show its value in the map tooltip
This example demonstrates how to show an area value for the triangle item in the map tooltip using the map item's attribute.
To accomplish this task, do the following:
- Create a map triangle using the MapPolygon item;
- Create a MapItemAttribute object using the MapItem.Attributes property;
- Specify the attribute name, type, and value in corresponding properties (MapItemAttribute.Name, MapItemAttribute.Type, and MapItemAttribute.Value);
- Specify the triangle area attribute using the MapItem.ToolTipPattern property.
ย
To enable the map tooltip, set the MapControl.ToolTipEnabled property to true.