Adding multiple markers from access database or DataGridView

Topics: Windows Forms
Nov 21, 2012 at 5:42 AM

Hi Radioman....
    is there any way out to add multiple markers to the Gmap using an Access database or a DatagridView.

Nov 21, 2012 at 10:53 AM

yes there is ;}

Nov 21, 2012 at 10:59 AM

Can you please tell me how to do it or give me the code...

Thanks in advance

Please help me out......


Nov 21, 2012 at 11:17 AM

and why i should do that ;} i'm not your c# teacher ya know

Nov 21, 2012 at 11:19 AM

Thank you very much.... :-)

Nov 21, 2012 at 11:27 AM

if you really have no idea:

var top = new GMapOverlay();

var marker = new GMarkerGoogle(MainMap.Position, GMarkerGoogleType.arrow);

Nov 24, 2012 at 2:13 AM
Edited Nov 24, 2012 at 2:14 AM

Hi Radioman,
   i tried the above code but it gave me only one red cross on the window instead of the map..

    But i've tried something like this but its not working, can you please check the snippet and  tell me where i'm doing the mistake....

for (int i = 0; i <= dataGrid1.Rows.Count; i++) 
                 foreach (DataGridViewRow row in dataGrid1.Rows)
                      var lat = double.Parse((dataGrid1.Columns[1].ToString()), CultureInfo.InvariantCulture);
                      var lng = double.Parse((dataGrid1.Columns[2].ToString()), CultureInfo.InvariantCulture);
                      MainMap.Position = new PointLatLng(lat, lng);
                      GMarkerGoogle m = new GMarkerGoogle(MainMap.Position, GMarkerGoogleType.green_pushpin);
Nov 24, 2012 at 1:41 PM

remove: MainMap.Position = new PointLatLng(lat, lng);

Nov 26, 2012 at 11:59 AM


how do I add my own images, with new lib?

Nov 26, 2012 at 12:03 PM

or use GMarkerGoogle with your bitmap


Oct 23, 2013 at 11:42 AM
any suggestion on how to add name to GMapMarker, want to use number to display list of markers ?