ThinkGeo.com    |     Documentation    |     Premium Support

Info Window in Desktop Edition

Hi,
Is there any way to get ‘Info Window’ like this on Feature click.

Thanks,
Riyaz

Hi Riyaz,

For desktop edition, we don’t have a popup for marker.

We only have the tooltips for marker, you can view how it looks like here: Balloon Style Tooltip

But if you want to implement that, I think you can write custom code, you can bind click event for marker then draw a popup window after it clicked, please don’;t forget unbind click event when the marker removed, or else it will make memory keep increase.

Regards,

Don

Hi Don,
I created my Own ‘Info Window’ by Panel,Label and Picture box.But I got one problem.

While creating info window on clicking on ‘aircraft’ feature. Info window coming correctly in exact location.

But whenever moving map, info window location not set correctly.

Suggest me, How to set it.
I applied Info window Location on ‘Map Click’ event for ‘Aircraft Layer’.

Panel pnlWaypointInfoClick = new Panel();
pnlWaypointInfoClick.Location = new Point((int)e.ScreenX, (int)e.ScreenY);

But how to handle pnlWaypointInfoClick.Location in ‘Map MouseMove’ event?

Thanks,
Riyaz

Hi Riyaz,

Please try following code:

 private void winformsMap1_MapClick(object sender, MapClickWinformsMapEventArgs e)
    {
        informationPanel1.Location = new Point((int)e.ScreenX, (int)e.ScreenY);
        informationPanel1.Visible = true;
        previousLocation = null;
    }

    private Point? previousLocation;

    private void winformsMap1_MouseMove(object sender, MouseEventArgs e)
    {
        if (e.Button == MouseButtons.Left)
        {
            if (previousLocation.HasValue)
            {
                var offset = new Point(e.Location.X - previousLocation.Value.X, e.Location.Y - previousLocation.Value.Y);
                informationPanel1.Location = new Point(informationPanel1.Location.X + offset.X, informationPanel1.Location.Y + offset.Y);
            }
            previousLocation = e.Location;
        }
    }

Thanks,
Peter