Count and list of markers!!!

Topics: Help, Windows Forms
May 25, 2013 at 9:57 PM
hello I'm a newbie with C #, but with this project is very easy to create beautiful programs. I'm writing a program similar to OziExplorer.
Now how can I count the waypoints that are on layers and how I can list them and their property?
Thanks and sorry if the question is silly
May 26, 2013 at 6:13 AM
int a = gMapControl1.Overlays.Count;
int b = gMapControl1.Overlays[0].Markers.Count;
PointLatLng place = gMapControl1.Overlays[0].Markers[0].Position;
May 27, 2013 at 8:55 AM
Edited May 27, 2013 at 8:06 PM
thanks sailor!!!

If in a gMapControl1_MouseClick funciton i declare

GMapOverlay punti = new GMapOverlay(gMapControl1, "punti");
gMapControl1.Overlays.Add(punti);

everytime I click on map i create a new layer and with gMapControl1.Overlays[0].Markers.Count; i have everytime "1"!!! one marker for layer!

If i declare
GMapOverlay punti = new GMapOverlay(gMapControl1, "punti");
gMapControl1.Overlays.Add(punti);

in public Form1(){..........} i can'use punti in gMapControl1_MouseClick function because name"punti" don't exsits in contest

Have you a solution for me?

Thanks again?!