PDA

View Full Version : moving pushpin in c#



sifu
08-30-2011, 10:43 AM
I am new to mappoint 2011 and c#.

I have set my lat and long.

I wrote the following code,

MapPoint.Location loc = axMappointControl1.ActiveMap.GetLocation(lat, long, 0);

next, I am adding a push pin on the location,

MapPoint.PushPin pin = axMappointControl1.ActiveMap.AddPushpin(loc, "pin");

what I am trying to do next, is move the pin when the lat and long values change instead of adding pin on each lat and long.

appreciate your help.

sifu
08-31-2011, 01:43 PM
figured it out. after you add a pin to the loc, add the code below,

pin.Location = loc;

this will move the pin rather than add a pin on each lat and long