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

How to: Show Additional Information Over the Map

  • 2 minutes to read

To show additional information over the map, do the following.

Note

To learn more about overlays and overlay items, refer to the Map Overlay and Map Overlay Items topics.

using DevExpress.XtraMap;
using System;
using System.Drawing;
using System.Windows.Forms;
//...
private void Form1_Load(object sender, EventArgs e) {
    MapOverlay overlayWithText = new MapOverlay {
        Alignment = ContentAlignment.BottomRight,
        JoiningOrientation = Orientation.Vertical,
        Margin = new Padding(0, 4, 8, 8),
        Padding = new Padding(7)
    };
    overlayWithText.Items.Add(new MapOverlayTextItem {
        Text = "Copyright © 2015. Microsoft and its suppliers. All rights reserved."
    });
    map.Overlays.Add(overlayWithText);

    Uri baseUri = new Uri(System.Reflection.Assembly.GetEntryAssembly().Location);
    MapOverlay overlayWithImage = new MapOverlay {
        Alignment = ContentAlignment.BottomRight,
        JoiningOrientation = Orientation.Vertical,
        Margin = new Padding(0, 0, 8, 4),
        Padding = new Padding(0),
    };
    overlayWithImage.Items.Add(new MapOverlayImageItem { ImageUri = new Uri(baseUri, "..\\..\\Images\\BingLogo.png") });
    map.Overlays.Add(overlayWithImage);
}