Kevin,
We don’t have that features built in but you can implement yourself. For example, you can get the hovering point and popup a message box using the MouseHover event, here are some sample codes for that.
private ScreenPointF lastMouseMove;
private void winformsMap1_MouseMove(object sender, MouseEventArgs e)
{
lastMouseMove.X = e.X;
lastMouseMove.Y = e.Y;
}
private void winformsMap1_MouseHover(object sender, EventArgs e)
{
PointShape mouseLocation = ExtentHelper.ToWorldCoordinate(winformsMap1.CurrentExtent, lastMouseMove, winformsMap1.Width, winformsMap1.Height);
double radius = 10.0 / winformsMap1.Width * winformsMap1.CurrentExtent.Width;
EllipseShape searchingEllipse = new EllipseShape(mouseLocation, radius, radius);
// Here let’s say all the points are in EditOverlay. Sure you can do the search in any other layers as well
foreach(Feature feature in winformsMap1.EditOverlay.EditLayer.InternalFeatures)
{
BaseShape tempShape = feature.GetShape();
if (tempShape is AreaBaseShape)
{
if (tempShape.Contains(mouseLocation))
{
Popup(new Point((int)lastMouseMove.X, (int)lastMouseMove.Y), feature);
break;
}
}
else if (tempShape.Intersects(searchingEllipse))
{
Popup(new Point((int)lastMouseMove.X, (int)lastMouseMove.Y),feature);
break;
}
}
}
private void Popup(Point location, Feature feature)
{
// display information
}
Similarly, you can popup your own context menu by hooking up MapClick event:
private void winformsMap1_MapClick(object sender, MapClickEventArgs e)
{
if (e.MouseButton == MapMouseButton.Right)
{
contextMenuStrip1.Show();
}
}
Let us know if you have any issues.
Thanks
Ben