locked
My route forked at one point into 2 seperate routes, as if there were 2 endpoints. RRS feed

  • Question

  • I created a route from Denver to Las Vegas, Morro Bay CA and ending in Los Altos CA. I used a total of 9 geopoints to describe the route. When I used the MapRouteFinder.GetDrivingRouteFromWaypointsAsync()the route forked where I70 hits I15. So 1 leg goes south on I15 towards Morro Bay and the other goes north to I80 and then to the bay area.

    Is this a bug or I didn't make the right sequence with the Windows.Services.Maps API ? The following describes how I used the Windows.Services.Maps API.

    I created a list of Geopoints: start, end, waypoints. Then I used MapRouteFinder.GetDrivingRouteFromWaypointsAsync(Iterable, MapRouteOptimization, MapRouteRestrictions) to define the route . I then used MapRouteView(MapRouteFinderResult.Route) to get the MapRouteView. Cleared the mapcontrol.Routes.clear(). Added the new MapRouteView to the Routes collection : mapcontrol.Routes.Add(). Fit the MapControl to the route : mapcontrol.TrySetViewBoundsAsync().

    Updated:

    I found that I needed to use waypoint pairs with MapRouteFinder API. I needed to add all route points like so: start point,waypoint A, waypoint A,Waypoint B, Waypoint B,Waypoint C, .........Waypoint H,end point. I must not have understood the explanation for the API.


    • Edited by OnTheBeach2 Thursday, January 4, 2018 6:46 PM
    Sunday, December 31, 2017 11:31 PM

Answers

  • Hi On the Beach 2,

    Thanks for following up with your solution! On most documentation pages there is a "Feedback" button.  If you click that, any comments you give become "feedback" goes directly to the documentation team for review.  Please let them know the source of any misunderstandings and offer any suggestions you might have to make the documentation clearer.

    Sincerely,

    IoTGirl

    Wednesday, May 2, 2018 2:18 AM