Pushpin on click event

JoeBo
10-16-2007, 03:43 PM
Hi Mappoint experts,

If I click on a map I can capture the position using:

Dim objMap As MapPoint.Map
objMap = Me.AxMappointControl1.ActiveMap
Dim objResults As MapPoint.FindResults
Dim objResult As Object

Dim objLoc As MapPoint.Location

objResults = objMap.ObjectsFromPoint(e.x, e.y)

Is it posible to add a pushpin at position(e.x, e.y)


Anyone help with a solution?

Regards,
Joe

JoeBo
10-16-2007, 04:49 PM
Hi Wilfred

Found your prior posting:

Location loc = mp.ActiveMap.XYToLocation(e.x, e.y);
mp.ActiveMap.AddPushpin(loc, "");

Which is exactly what I needed.

Thanks again,
Joe

 
Web mp2kmag.com
mapforums.com