Bing Multi Itinerary Optimization (MIO) Not Recognizing Valid Route Path Even When Passed Coordinates RRS feed

  • Question

  • Hello,

    I'm using the Bing MIO API to do routing. I'm first getting the lat/long data and passing that information to the API. The geocoding API has no problem recognizing the address and provides the lat/long data. Any addresses on one specific street cause issues once the lat/long data is passed to the MIO API though. I've substituted the lat/long with other streets in that area and it works just fine. The Bing Maps online interface also recognizes the lat/long data and I can use that to get directions without issue. It seems localized to the MIO API, which spits out the "No route was found for the waypoints provided" error. The street in question is Noble Ridge Terrace in Gaithersburg, MD 20882. Any insight on what could be causing the issue is greatly appreciated. 

    • Edited by Index0 Thursday, January 16, 2020 3:03 PM
    Thursday, January 16, 2020 2:57 PM

All replies

  • Can you provide a valid street number for us to research?  MIO uses standard routing in the back end so you should have the same issue with any route on that street if there is a problem in the routing system. Can you pull the failing route out of the call and take a look at that specifically?

    NOTE: This is a dead end street that looks to be less than a block long. A valid address I found was 9725 Noble Ridge Terrace, Gaithersburg, MD 20882 so can you provide the route that you expect?

    Thursday, January 16, 2020 4:32 PM
  • Thank you for the quick reply! The exact address is 9730 Noble Ridge Terrace. I can get the lat/long for it just fine (39.24911918, -77.20047901),  which Bing Maps recognizes as that address. I'm also doing the simple optimized route and that doesn't seem to work either. If I pull the address out of the calls they work fine. If I replace it with a nearby street address on a different street, it works fine. I've gone down to just using the optimized route API with a start and end and that as the via waypoint, and it still fails. 

    See the below url example which fails (only missing my key):,-77.207260&viaWaypoint.2=39.24911918,-77.20047901&WayPoint.3=39.266000,-77.207260&optimizeWaypoints=true&optimize=timeWithTraffic&distanceUnit=mi&key=<KEY>

    If you replace waypoint 2 with another lat/long pair, it works fine. Here is the same call with a nearby street address as waypoint 2 instead (only missing my key):,-77.207260&viaWaypoint.2=39.264447,-77.203194&WayPoint.3=39.266000,-77.207260&optimizeWaypoints=true&optimize=timeWithTraffic&distanceUnit=mi&key=<KEY>

    • Edited by Index0 Thursday, January 16, 2020 7:11 PM
    Thursday, January 16, 2020 7:11 PM
  • Interesting. Does the issue happen for you if you use the house number 9725?
    Saturday, January 18, 2020 7:32 PM
  • Yes. Here is the simple route optimization url with that address as the 2nd waypoint and it returns an error:,-77.207260&viaWaypoint.2=39.249273,-77.200426&WayPoint.3=39.266000,-77.207260&optimizeWaypoints=true&optimize=timeWithTraffic&distanceUnit=mi&key=<KEY>

    "errorDetails":["No route was found for the waypoints provided."]
    Monday, January 20, 2020 2:08 PM
  • Hello,

    Was there any fix found? I've provided some information once again below.

    Yes. Here is the simple route optimization url with that address as the 2nd waypoint and it returns an error:,-77.207260&viaWaypoint.2=39.249273,-77.200426&WayPoint.3=39.266000,-77.207260&optimizeWaypoints=true&optimize=timeWithTraffic&distanceUnit=mi&key=<KEY>

    "errorDetails":["No route was found for the waypoints provided."]

    Monday, January 27, 2020 2:57 PM
  • I believe the issue is that you are trying to optimize a route with two of the same points. The optimal route to the same point is not to move so there is no route. Try your call as:,-77.207260&viaWaypoint.2=39.264447,-77.203194&WayPoint.3=39.249273,-77.200426&optimizeWaypoints=true&optimize=timeWithTraffic&distanceUnit=mi&key=<KEY

    If I use the three points you give, the route completely overlaps so it is unable to complete the route.  If I take the three points you are using and enter them into the website I get:


    Monday, January 27, 2020 8:15 PM
  • Hello,

    Thank you for the reply. I don't believe that is the case because it works just fine with this call and the start and end points are the same:,-77.207260&viaWaypoint.2=39.264447,-77.203194&WayPoint.3=39.266000,-77.207260&optimizeWaypoints=true&optimize=timeWithTraffic&distanceUnit=mi&key=<KEY>

    In addition, I believe the 1st and 3rd points are not to be rearranged. Just the 2nd point is free to be moved (though it has nowhere to be moved to), as it is the only one with the "viaWaypont" instead of the "Waypoint". So, it should not be a problem that there are 2 of the same point, as it is forcing a different point in between them. 

    In fact, I tested with the point you provided as A in your example as the start and end points and that works just fine:,-77.207260&viaWaypoint.2=39.264447,-77.203194&WayPoint.3=39.266000,-77.207260&optimizeWaypoints=true&optimize=timeWithTraffic&distanceUnit=mi&key=<KEY>

    For the sake of being thorough though, the call can be done even with just 2 of the same point and still not return an error:,-77.207260&WayPoint.2=39.266000,-77.207260&optimizeWaypoints=true&optimize=timeWithTraffic&distanceUnit=mi&key=<KEY>

    No error:

    {"authenticationResultCode":"ValidCredentials","brandLogoUri":"http:\/\/\/Branding\/logo_powered_by.png","copyright":"Copyright © 2020 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","resourceSets":[{"estimatedTotal":1,"resources":[{"__type":"Route:http:\/\/\/search\/local\/ws\/rest\/v1","bbox":[39.266563,-77.207648,39.266564,-77.207647],"id":"v69,h-483360349,i0,a0,cen-US,dAAAAAAAAAAA1,y0,s1,m1,o1,t7,wNV66SQyiQ0A3cXK_Q01TwA2~ArXSjVbB_4kVAADgAZAxjT4C0~TW95ZXIgUmQ1~~~~v11,wNV66SQyiQ0A3cXK_Q01TwA2~ArXSjVbB_4kVAADgAZAxjT4C0~TW95ZXIgUmQ1~~~~v11,k0","distanceUnit":"Mile","durationUnit":"Second","routeLegs":[{"actualEnd":{"type":"Point","coordinates":[39.266564,-77.207647]},"actualStart":{"type":"Point","coordinates":[39.266564,-77.207647]},"alternateVias":[],"cost":0,"description":"Moyer Rd","itineraryItems":[{"compassDirection":"north","details":[{"endPathIndices":[0],"maneuverType":"DepartStart","mode":"Driving","names":["Moyer Rd"],"roadType":"Street","startPathIndices":[0]}],"exit":"","iconType":"Auto","instruction":{"formattedText":null,"maneuverType":"DepartStart","text":"Head north on Moyer Rd toward Durango Dr"},"isRealTimeTransit":false,"maneuverPoint":{"type":"Point","coordinates":[39.266564,-77.207647]},"realTimeTransitDelay":0,"sideOfStreet":"Unknown","tollZone":"","towardsRoadName":"Durango Dr","transitTerminus":"","travelDistance":0,"travelDuration":0,"travelMode":"Driving"},{"compassDirection":"north","details":[{"endPathIndices":[0],"maneuverType":"ArriveFinish","mode":"Driving","names":["Moyer Rd"],"roadType":"Street","startPathIndices":[0]}],"exit":"","hints":[{"hintType":"NextIntersection","text":"If you reach Durango Dr, you've gone too far"}],"iconType":"Auto","instruction":{"formattedText":null,"maneuverType":"ArriveFinish","text":"Arrive at Moyer Rd on the right"},"isRealTimeTransit":false,"maneuverPoint":{"type":"Point","coordinates":[39.266564,-77.207647]},"realTimeTransitDelay":0,"sideOfStreet":"Right","tollZone":"","transitTerminus":"","travelDistance":0,"travelDuration":0,"travelMode":"Driving"}],"routeRegion":"NAv2","routeSubLegs":[{"endWaypoint":{"type":"Point","coordinates":[39.266564,-77.207647],"description":"Moyer Rd","isVia":false,"locationIdentifier":"2|181|210|141|86|193|255|137|21|0|0|224|1|144|49|141|62|2|39.266564,-77.207647","routePathIndex":1},"startWaypoint":{"type":"Point","coordinates":[39.266564,-77.207647],"description":"Moyer Rd","isVia":false,"locationIdentifier":"2|181|210|141|86|193|255|137|21|0|0|224|1|144|49|141|62|2|39.266564,-77.207647","routePathIndex":0},"travelDistance":0,"travelDuration":0}],"travelDistance":0,"travelDuration":0}],"trafficCongestion":"Unknown","trafficDataUsed":"Flow","travelDistance":0,"travelDuration":0,"travelDurationTraffic":0,"travelMode":"Driving"}]}],"statusCode":200,"statusDescription":"OK","traceId":"dcb130963a32494e9b3d655b242d2e9c|CH0000108E||CH00001308, CH000014AD"}

    As you can see, it knows it's going nowhere ""travelDistance":0,"travelDuration":0,"travelDurationTraffic":0", but still does not return an error. It appears to be call specific.

    I also checked to see if the original call worked with the middle waypoint as the end waypoints and the end as the middle, and it does:,-77.20047901&viaWaypoint.2=39.266000,-77.207260&WayPoint.3=39.24911918,-77.20047901&optimizeWaypoints=true&optimize=timeWithTraffic&distanceUnit=mi&key=<KEY>

    I have no idea what would cause this strange behavior. Would you have any other suggestions?

    Monday, January 27, 2020 9:11 PM