How to add context menu to GMAP Markers

Mar 8, 2010 at 8:22 AM
Edited Mar 8, 2010 at 8:32 AM

Hi All,

   I am very much thankfull for this GMAP project...

I have one problem...Can any one help me how to add contextmenu or softmenus to GMAP marker ToolTips?

Thanks in advance.


Mar 8, 2010 at 8:42 AM
  • windows forms, map.OnMarkerClick and item.LocalPosition
  • wpf, just add context menu to your shape/marker 
Mar 8, 2010 at 9:34 AM

Hi radioman,

             Thanks for your reply.. I am new developer in .net .I am using GMap in windows application.

 What is need is when i right click on the marker tool tip, i want display softmeu or context menu.

Can you please send me code for adding the contextmenustrip to the marker tool tip.

Thanks in advance

Mar 8, 2010 at 9:55 PM

If your new to .net, msdn is your best friend. Inside the OnMarkerClick event, add code to create the context menu at the position of the marker (as radioman said, item.LocalPosition).  Here's the code from msdn for creating a context menu from msdn . If you don't know what events are, long story short you write a method, and you 'subscribe' that method to the OnMarkerClick event, and every time the marker is clicked, it executes the code in the method. Hope this helps...

Mar 9, 2010 at 2:34 AM

okk...Thanx for the help...