Search code examples
wpfgmap.net

Add Markers in WPF


I need to add markers to my map. Problem: I'm using WPF, not WinForms.

GMapMarker marker = new GMapMarker(new PointLatLng(-25.966688, 32.580528));
gmap.Markers.Add(marker);

Now according to this question the solution is:

marker.Shape = new MarkerShape(....);

Could someone explain to me, how to I initalize this shape?

Thanks!


Solution

  • I resolved the problem with:

    marker.Shape = new Ellipse
                {
                    Width = 10,
                    Height = 10,
                    Stroke = Brushes.Black,
                    StrokeThickness = 1.5
                };
    

    That's a little black circle.