MapPointer.Text Property

Gets or sets the text for a map pointer.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v21.1.dll


public string Text { get; set; }

Property Value

Type Default Description


A string value that is the text for a map pointer.


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();

    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);
See Also