WPF how add marker and clear marker?

Topics: WPF
Sep 20, 2012 at 3:10 AM
Edited Sep 20, 2012 at 3:11 AM

How can I add marker into gmap in WPF?

This is how I did it in winforms:

GMapOverlay
marker = new GMapOverlay(gMapLocation, "marker" 
); 
marker.Markers.Add(
new GMapMarkerGoogleRed(new PointLatLng 
(Lat, Lng))); 
gMapLocation.Overlays.Add(marker);

To clear the marker:

gMapLocation.Overlays.Clear();

Coordinator
Sep 20, 2012 at 6:24 AM

map.Markers.Clear();

Sep 20, 2012 at 7:39 AM

Any place I can refer to add GMapMarkerGoogleRed to the map for wpf?

Coordinator
Sep 20, 2012 at 7:56 AM

there is no such marker in wpf, but any UIElement can be it, just add the image, use it as the shape

Sep 20, 2012 at 8:02 AM

I thought there is comething like GMapMarker?

Sep 20, 2012 at 9:36 AM

Now there is a default + sign on the location. How can I change it to GMapMarkerGoogleRed?

Please help.

Coordinator
Sep 20, 2012 at 11:13 AM

map.ShowCenter = false;

and render your own ;}