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
Results 1 to 2 of 2

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. #1
    mikica1972 is offline 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)?

    Thanks in advance!

  2. #2
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    LocationToX method and LocationToY method will do that.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Obtain LatLong with Address
    By ivan in forum Bing Maps and MapPoint Web Service
    Replies: 5
    Last Post: 05-24-2007, 05:00 PM
  2. Lat. and Long.
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-06-2004, 03:09 AM
  3. How to obtain ZIP code from lat-long?
    By BC in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-29-2003, 06:49 AM
  4. How do you obtain/set the maps Scale. I.E 1:10000 ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-21-2002, 04:07 AM
  5. Is there a way I can obtain a copy of the EULA for....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-30-2001, 08:57 AM

Tags for this Thread

Posting Permissions

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27