[VB2012] I am repeatedly adding pushpins from a database to a Bing Maps WPF MapLayer (ml) using the following code:
Dim pp As New Pushpin()
pp.Location = New Location(utm.Latitude.GetDecimalCoordinate, utm.Longitude.GetDecimalCoordinate)
pp.PositionOrigin = PositionOrigin.BottomCenter
pp.Content = PinLabel
pp.ToolTip = PinLabel
pp.FontSize = 6.0R
' need to put an AddHandler in here
ml.Children.Add(pp)
The pushpins are added and displayed on the maplayer. What I don't understand is how to add the AddHandler for each pushpin so that I can determine when a pushpin is clicked. I would really appreciate some insight. I'm just not getting what I need to do from the online examples I have found.
Addhandler pp.Click, AddressOf pp_click. You have to make the sub routine with the signature that matches the event. - OneFineDay