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 5 of 5

How do I calculate a route distance without displaying route

This is a discussion on How do I calculate a route distance without displaying route within the MapPoint Desktop Discussion forums, part of the Map Forums category; I need to determine how to calculate the distance in Miles from two points BUT I do not want to ...

  1. #1
    spideybud is offline Junior Member Yellow Belt
    Join Date
    Jul 2003
    Posts
    13

    How do I calculate a route distance without displaying route

    I need to determine how to calculate the distance in Miles from two points BUT I do not want to display the Route or place it on the map just get the distance. Currently I get the distance and can display it but the route shows on the map.

    'Add route stops and calculate the route

    Set objRoute = objMap.ActiveRoute
    objRoute.Waypoints.Add CMD
    objRoute.Waypoints.Add objLocCrimes(MaxDistanceIndex)
    objRoute.Calculate

    MsgBox CStr(objRoute.Distance)



    Is this possible to get the distance without displaying route in Mappoint Control? (BTW I need the route distance not the direct distance so I don't believe I can use the distance function)


  2. #2
    rbarthels is offline Member Green Belt
    Join Date
    Nov 2002
    Posts
    52
    I don't see any possibility

    Rainer

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    try putting objroute.clear after you calculate the distance

  4. #4
    mizzy is offline Junior Member White Belt
    Join Date
    Sep 2003
    Posts
    5
    Hows about post the results to a file and set the following in your program
    objApp.Visible = False

  5. #5
    Fer
    Fer is offline Junior Member White Belt
    Join Date
    Jun 2003
    Posts
    11
    The cleanest way and with less complications that I have found is by having a hidden MP control in my form and using the code you posted here on that control. That way, you will get the results you want and the map still won't show up on the form. It doesn't take too much overhead since you are not doing heavy calculations, just determining route distance from A to B.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to calculate distance between location and route ?
    By tontaegu in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-19-2005, 02:14 PM
  2. Displaying The Route Planner
    By EdB in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 08-09-2005, 01:06 PM
  3. Calculate route
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 03-16-2005, 01:42 PM
  4. Optimize and calculate a Route
    By rms62 in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 08-22-2003, 03:55 PM
  5. Calculate route
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-03-2003, 03:25 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