WPF Markers

Mar 12, 2009 at 4:09 PM
Sorry folkes, need a bit of clarity here...
Are WPF markers currently working in version gmap4dotnet-32093.
I've tried the MainMap.AddMarker(marker) code, but the markers are not being created (looks as though the local Canvas X and Y is not being set)

Is this right, or am I missing something (which is usually the case!)

Here's my code:


PointLatLng? start = GMaps.Instance.GetLatLngFromGeocoder(location);



if (start != null)




GMapMarkerCircle c = new GMapMarkerCircle(MainMap);


c.Position = start.Value;

c.Label.Content =

String.Format("Marker {0}",MainMap.Objects.Count);





p.s. nice work radioman.
Mar 13, 2009 at 11:32 AM
Got it working, removed the itemsource = Objects, and then added the canvas




void GMap_Loaded(object sender, RoutedEventArgs e)








//this.ItemsSource = Objects;















Also added...


  •  ObservableCollection of GMarkMarker to keep track of what markers I've got.
  • IsCurrentMarker boolean to GMapMarker
  • MouseDown event in GMapMarker to set it as CurrentMarker

Would really like to see some AddPolygon() / AddLayer() functionality... I can work on it here and post it later.

Mar 13, 2009 at 12:36 PM
Edited Mar 15, 2009 at 3:21 PM
wpf version in latest trunk is in testing, use previous sets to get working stuff ;} Any ideas about how to add shapes using ItemsSource are very welcome!