Map move with movement of marker programatically

Topics: Help
May 4, 2011 at 9:28 AM

Thanx for this wonderful project.

 

I am trying to imitate navigation i.e mark the current position of GPS location and move it with changing GPS. But i am confused with moving map when the current marker is out of current map view. I saw that we can use map.offset but how the difference of latitude and longitude reflect the screen points so as to use in map.offset?? Can somebody clear on this??

Coordinator
May 4, 2011 at 12:06 PM

myMarker.Position = new PointLatLng(54.6961334816182, 25.2985095977783);

if(!MainMap.CurrentViewArea.Contains(myMarker.Position) // center map if object is out of view, you can disable it, but then map will be centered on each position update
{
  MainMap.Position = myMarker.Position;
}