MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Get distances/driving times between waypoints

This is a discussion on Get distances/driving times between waypoints within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I am currently integrating MapPoint 2004 into a VB6 application. The application uses MapPoint to calculate the driving distance ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 01-25-2006
Junior Member
White Belt
 
Join Date: Jan 2006
Posts: 6
Get distances/driving times between waypoints

Hi,

I am currently integrating MapPoint 2004 into a VB6 application. The application uses MapPoint to calculate the driving distance and time between calls at different addresses for an employee.
It currently does by this creating a map, adding two waypoints for each journey between calls, calculating the route and passing back the driving distance and time to the main application, then closing the map.
This is then repeated for each journey between addresses in the employees workload for that day.

When this process is performed for several hundred employees it gets pretty slow, so I want to improve the performance.

I have done this to some extent by creating a map only once, then calculating each successive journey between zip codes on the same map, clearing the route every time. This has produced an improvement.

What I would like to do now is to add ALL the postcodes representing an employees calls that day to the map as waypoints, then calculate the route for the whole day instead of using pairs of calls and calculating the route between these.
I have tried this but there is no way of accessing the driving time and distance between each waypoint in the route without MapPoint recalculating the route between the two waypoints, and I need the individual driving time/distance between each pair of Waypoints.
This information must be somewhere within MapPoint as MapPoint must internally total this information up in order to get the overall time/distance for the route, but I can see no object/property/method that allows me to get at it.

Does anyone have any ideas? I hope I have clearly explained the problem

Basically instead of

Add Postcode 1 waypoint
Add postcode 2 waypoint
calculate route to get time/distance

Add postcode 2 waypoint
Add postcode 3 waypoint
calculate route to get time/distance

I want to

Add Postcode 1 waypoint
Add postcode 2 waypoint
Add postcode 3 waypoint
calculate whole route 1>3 and find the postcode 1>postcode 2 time/distance and the postcode 2>postcode 3 time/distance without performing another route calculation


Thanks you in advance for your help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 01-25-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Hi,

Yes it is possible. This is working example in C#. Each waypoint has his local StartTime and Distance calculated against next waypoint.

Code:
    Directions dir = route.Directions;
    foreach (MapPoint.Direction d in dir) {
        Console.WriteLine("Start time:  " + Convert.ToString(d.StartTime));
        Console.WriteLine("Distance:    " + Convert.ToString(d.Distance));
        Console.WriteLine("Instruction: " + d.Instruction);
    }
    Console.WriteLine("Total driving time: " + Convert.ToString(route.DrivingTime));
    Console.WriteLine("Total distance:     " + Convert.ToString(route.Distance));
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 01-25-2006
Junior Member
White Belt
 
Join Date: Jan 2006
Posts: 6
Wilfried,

thanks a lot for your reply. I will try this out.

Jonathan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
distances or driving, times, waypoints


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/get-distances-driving-times-between-waypoints-4733.html

Posted By For Type Date
Driving Times Distances in Spain This thread Refback 01-15-2008 12:53 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Huge Number of Drive Times lbequis MapPoint 2006/2009 Discussion 3 08-27-2005 09:31 AM
Schedule Stop Times Anonymous MapPoint 2006/2009 Discussion 13 06-06-2005 04:41 AM
Import stop times? PBrantley MapPoint 2006/2009 Discussion 0 03-22-2005 10:57 AM
Driving Day - How to turn off? Clive2004 MapPoint 2006/2009 Discussion 1 01-06-2004 06:42 AM
Planning a route after arrival times Anonymous MapPoint 2006/2009 Discussion 0 02-24-2003 08:11 AM


All times are GMT -5. The time now is 09:29 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55