Hi,
I need to show tooltip over the cluster that this cluster consist of this many points.Means if cluster has 5 points, on mouse move i need to show 'Contains 5 points inside'. Its very urgent so plz let me know the solution asap.
Regards
Hi,
I need to show tooltip over the cluster that this cluster consist of this many points.Means if cluster has 5 points, on mouse move i need to show 'Contains 5 points inside'. Its very urgent so plz let me know the solution asap.
Regards
Hello vivek,
Thanks for your post, here I made a sample that I think fit your requirements, please get the attachment and have a try, I hope it can help you.
On the program section, adding the mouse move event on winforms map, and filtering the tool tip showing condition, as following codes:
((LayerOverlay)winformsMap1.Overlays["PointOverlay"]).Layers[0].Open();
RectangleShape boxing = ((LayerOverlay)winformsMap1.Overlays["PointOverlay"]).Layers[0].GetBoundingBox();
((LayerOverlay)winformsMap1.Overlays["PointOverlay"]).Layers[0].Close();
RectangleShape rect = winformsMap1.CurrentExtent;
PointShape mousePoint = ExtentHelper.ToWorldCoordinate(rect, new ScreenPointF(e.X, e.Y), winformsMap1.Width, winformsMap1.Height);
if (boxing.Contains(mousePoint))
{
toolTip.ToolTipTitle = "There are five points on Point Overlay.";
toolTip.Show("There are five points on Point Overlay.", this, new Point(
(int)(ExtentHelper.ToScreenCoordinate(rect, new Feature(boxing.GetCenterPoint()), winformsMap1.Width, winformsMap1.Height).X),
(int)(ExtentHelper.ToScreenCoordinate(rect, new Feature(boxing.GetCenterPoint()), winformsMap1.Width, winformsMap1.Height).Y)));
}
else
{
toolTip.Hide(this);
}
Thanks,
Gary
WindowsFormsApplication16.zip (11.2 KB)