I creating a simple app working with maps on c#, using GMap.NET control for it. So, my question is: I want to make a polygons, polylines and markers in one form using another. My code relating to it is:
First form (MapModule):
GMapOverlay polygonOverlay = new GMapOverlay("polygons");
GMapOverlay markersOverlay = new GMapOverlay("markers");
GMapOverlay polylineOverlay = new GMapOverlay("polylines");
Second form (NewFile):
public MapModule _MapModule;
public Newfile(MapModule MapModule)
{
InitializeComponent();
_MapModule = MapModule;
}
private void addpolygon_Click(object sender, EventArgs e)
{
GMapPolygon polygon = new GMapPolygon(points, "What you need");
_MapModule.polylineOverlay.Polygons.Add(polygon);
}
The output is:
'GoogleMaps.MapModule.polylineOverlay' is inaccessible due to its protection level
I think, it must be very simple, but I am completely new in programming.
.