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

Latitude and Longitude

This is a discussion on Latitude and Longitude within the MapPoint Desktop Discussion forums, part of the Map Forums category; The code below captures the latitudes and longitues correctly, however, it breaks when i try to "goto" the latitude and ...

  1. #1
    virgilar is offline Junior Member White Belt
    Join Date
    Mar 2005
    Posts
    8

    Latitude and Longitude

    The code below captures the latitudes and longitues correctly, however, it
    breaks when i try to "goto" the latitude and longitude. It seems to be a
    syntax error.

    These are the line where i need help with. I want to go the calculated Lat
    and Lon. Again, they are alredy calcultated, i just want to go to them.

    Thanks for any help given.

    Set objLocCalc = MappointControl1.ActiveMap.Location(lat, lon)

    '.SelectedArea(lat, lon)

    objLocCalc.GoTo


    Private Sub MappointControl1_BeforeClick(ByVal Button As Long, ByVal Shift
    As Long, ByVal X As Long, ByVal Y As Long, Cancel As Boolean)
    Dim objMap As MapPointCtl.Map
    Dim objLoc As MapPointCtl.Location
    Dim objLocCalc As MapPointCtl.Location
    'Dim Lat As Double
    'Dim Lon As Double
    Set objMap = MappointControl1.ActiveMap
    Set objLoc = MappointControl1.ActiveMap.XYToLocation(X, Y)
    CalcPos objMap, objLoc, lat, lon
    Print lat
    Print lon

    Set objLocCalc = MappointControl1.ActiveMap.Location(lat, lon)

    '.SelectedArea(lat, lon)

    objLocCalc.GoTo


    'objMap.SelectedArea.Location.GoTo


    End Sub

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    You wants to Goto to a Location object? Try this:

    Code:
                Location Loc = MP.ActiveMap.GetLocation(Lat, Lon, Alt);
                Loc.GoTo();

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to get latitude and longitude
    By ma2005pp in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 09-28-2005, 02:57 AM
  2. longitude and latitude lookup
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 01-24-2004, 10:20 AM
  3. longitude and latitude lookup
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 01-23-2004, 04:58 PM
  4. Latitude and Longitude
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-25-2003, 01:52 PM
  5. NMEA latitude/longitude and mappoint latitude/longitude
    By muurman in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 11-22-2003, 05:42 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