|
|
|
date: Tue, 06 Mar 2007 19:16:22 -0500,
group: microsoft.public.mappoint.webservice
back
Re: Finding best route
>
> What your looking for is the SegmentPreference class.
> Your looking for the SegmentPreference.Shortest.
>
> http://msdn2.microsoft.com/en-us/library/aa492545.aspx
Actually, I looked at that, but I don't think that will help me.
I haven't used the webservice yet, but according to MSDN:
>
>
> SegmentPreference Enumeration = The possible travel preferences
> for a particular route segment.
>
>
> The SegmentPreference enumeration is used with the
> SegmentOptions.Preference property.
>
>
> SegmentOptions Class = Contains the preferences for how the route
> and map views are calculated for the specified segment.
>
>
> The SegmentOptions object is passed in the
> SegmentSpecification.Options property when calling
> the RouteServiceSoap.CalculateRoute method
>
>
>
> RouteServiceSoap.CalculateRoute Method
>
> Parameters
> specification = The route (RouteSpecification object)
> to calculate
>
>
> RouteSpecification Class
>
> Public Properties
> Segments = The specification of each segment that makes up the
> route as an array of SegmentSpecification[] objects.
> The order of the array is the order of the stops on
> the route. Required.
>
So I gather from this that if I call RouteServiceSoap.CalculateRoute
with a list of n waypoints, this method will always return driving
directions for visiting these n destinations in the same order in
which I specified them in the RouteSpecification.Segments array.
This would not be what I need at all. I need MapPoint to TELL ME
what order to visit the n waypoints in, not just provide me with
the shortest-route driving directions from waypoint 0 to waypoint 1,
and the shortest-route driving directions from point 1 to point 2,
and so on....
My software has a list of orders that need to be delivered. The
delivery truck driver will log into my software and click a button,
and my software needs to tell him which of his deliveries to make
first, which to make second, which to make third, and so on.
My software needs to send mappoint a list of the delivery addresses
and mappoint needs to RE-ORDER that list of locations into the
shortest route. From what I understand of the documentation,
RouteServiceSoap.CalculateRoute will NOT do that.
Is there any other method to call that WILL do that?
Thank you for your time, everyone.
Tom.
date: Wed, 07 Mar 2007 18:28:29 -0500
author: Tom
Re: Finding best route
Tom,
On Wed, 07 Mar 2007 18:28:29 -0500, Tom
wrote:
>So I gather from this that if I call RouteServiceSoap.CalculateRoute
>with a list of n waypoints, this method will always return driving
>directions for visiting these n destinations in the same order in
>which I specified them in the RouteSpecification.Segments array.
>
>
>This would not be what I need at all. I need MapPoint to TELL ME
>what order to visit the n waypoints in, not just provide me with
>the shortest-route driving directions from waypoint 0 to waypoint 1,
>and the shortest-route driving directions from point 1 to point 2,
>and so on....
>
>
>My software has a list of orders that need to be delivered. The
>delivery truck driver will log into my software and click a button,
>and my software needs to tell him which of his deliveries to make
>first, which to make second, which to make third, and so on.
>
>My software needs to send mappoint a list of the delivery addresses
>and mappoint needs to RE-ORDER that list of locations into the
>shortest route. From what I understand of the documentation,
>RouteServiceSoap.CalculateRoute will NOT do that.
>
This functionality is called "Optimize Stops" in the MapPoint desktop
product (MapPoint North America 2006). Last time I looked (which is
some time ago) it was not available in the MapPoint web service, maybe
things have changed though. For MapPoint desktop, this is available
programmatically via the "Optimize" method of the Waypoints collection
- maybe this helps find it in the web service in case it has been
added in recent versions, I'm not too familiar with MapPoint web
service unfortunately.
Regards,
Gilles [MVP].
(Please reply to the group, not via email.
Find my MVP profile with past articles / downloads here:
http://www.gilleskohl.de/mvpprofile.htm)
date: Thu, 08 Mar 2007 07:44:19 +0100
author: Gilles Kohl [MVP]
|
|