MapPointer.Text Property
Gets or sets the text for a map pointer.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v20.2.dll
NuGet Package: DevExpress.Win.Map
Declaration
Property Value
Type | Default | Description |
---|---|---|
String | String.Empty | A string value that is the text for a map pointer. |
Remarks
The following example specifies text and its settings for a map pushpin:
using DevExpress.Utils.Svg;
using DevExpress.XtraMap;
//...
private void Form1_Load(object sender, EventArgs e) {
vectorLayer = new VectorItemsLayer();
mapControl1.Layers.Add(vectorLayer);
MapItemStorage storage = new MapItemStorage();
vectorLayer.Data = storage;
MapPushpin pushpin = new MapPushpin();
pushpin.Location = new GeoPoint(51.5074, 0.1278);
pushpin.Text = "London";
pushpin.TextColor = Color.Black;
pushpin.TextGlowColor = Color.White;
pushpin.SvgImage = SvgImage.FromFile(GetRelativePath("arrow.svg"));
pushpin.SvgImageSize = new Size(64, 64);
// If you specify the puspin image, use the TextOrigin property
// to set the center point position of the text block in relation to the image's top-left corner.
pushpin.TextOrigin = new Point(32,32);
storage.Items.Add(pushpin);
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Text 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