Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

 Subscribe to receive our newsletter. Subscribe Unsubscribe

## Obtain X, Y from Lat, Long

This is a discussion on Obtain X, Y from Lat, Long within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi to all, I'm trying to draw a circle with an inside arrow which shows vehicle heading. To do that, ...

1. Junior Member White Belt
Join Date
Oct 2003
Posts
6

## Obtain X, Y from Lat, Long

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)?

2. LocationToX method and LocationToY method will do that.

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•