Hi to all,
I'm trying to draw a circle with an inside arrow which shows vehicle heading.
To do that, I need to know X,Y from vehicle position (Lat/Long).
Recently, I've created a C# function which retreives two sets of X,Y points on circle, when lined represents a heading:
private Point GetAngledLineEndPoint(Point ptCenter, double nRadius, double fAngle)
{
double x = (double)System.Math.Cos(2*System.Math.PI*fAngle/360)*nRadius+ptCenter.X;
double y = -(double)System.Math.Sin(2*System.Math.PI*fAngle/360)*nRadius+ptCenter.Y;
return new Point((int)x,(int)y);
}
Does anyone know how to convert MapPoint Lat/Long into MapPoint X/Y (screen)?
Thanks in advance!