OnMarkerClick event produce more than one event!?!

Topics: Windows Forms
Feb 12, 2011 at 8:44 AM


  nice control this GMap.net. I really enjoy code with it. Now I have little problem about OnMarkerClick event, because when I click on of the markers, it causes more that one event.


private void gMapControl1_OnMarkerClick(GMapMarker item, MouseEventArgs e)
            if (e.Button == MouseButtons.Left)



With this code I get three MessageBox and I expect only one. What I do wrong or is there bug?

I am using WindowsForm.

Feb 12, 2011 at 3:15 PM

i guess you click on few overlapped markers?

Feb 13, 2011 at 2:16 PM

Yes problem was that I accidently add same overlay many time to mapcontrol. Now it seems to work.



Feb 13, 2011 at 5:42 PM

i see ;}

Apr 4, 2012 at 6:44 PM

Hi Radioman;

I created some markers to show some pictures or video, I want when I click just on these markers show the video and not all markers.

How could I treat this

PointLatLng point1 = new PointLatLng(54.6961334816182, 25.2985095977783);
                GMapMarker m = new GMarkerGoogle(point1, GMarkerGoogleType.red);
                m.ToolTipText = "video or pictures";
                m.ToolTipMode = MarkerTooltipMode.Always;                

Apr 4, 2012 at 7:21 PM


Apr 5, 2012 at 8:19 AM

I'd like when I click on JUST ONE marker it shows me the picture, not ALL markers (private void gMapControl1_OnMarkerClick(GMapMarker item, MouseEventArgs e)).

Apr 5, 2012 at 8:22 AM

so whats the problem? ;]

Apr 5, 2012 at 8:31 AM

How could I make that?

Apr 5, 2012 at 8:36 AM

I added this 

if (e.Button == MouseButtons.Left && m.ToolTipText == "video or pictures")

but it don't work, I have pictures or message on all markers!

Apr 5, 2012 at 8:59 AM

Ok, ok that's ok ;)