Route API Avoid Options Throwing Off Results

cdickins 1 Reputation point
2022-05-13T13:14:44.117+00:00

I'm trying to calculate a distance between two points within the continental US via the Routes API. I always include avoid=ferry,borderCrossing to handle certain cases near the Canadian border. In this case, I'm going from Cleveland, MS to Greensboro, NC and there should be no border crossings or ferries on the route. I expect a mileage distance of 744 miles, but get 827 miles when the avoid options are included. Remove those options and I get the expected 744 mile route. I noticed the 744 mile route includes tolls. I'm not instructing the route API to avoid tolls, but it acts like it wants to avoid tolls if I include any avoid option. Anything I can do to get the appropriate distance, while keeping the avoid options in the request? Or could this be a bug in the API?

I can reproduce the issue via the Bing Maps website as well entering these addresses and then toggling on or off different avoid options.

https://www.bing.com/maps?rtp=adr.1003+W+Sunflower+Rd%2C+Cleveland%2C+MS+38733%7Eadr.1921+W+Gate+City+Blvd%2C+Greensboro%2C+NC+27403&rtop=1%7E0%7E0&toWww=1&redig=1F0E024BCB224DFAA9F070C46D1250FA&cp=34.688518%7E-85.292449&lvl=6.9

From: Delta State University, 1003 W Sunflower Rd, Cleveland, MS 38733
To: Greensboro Coliseum Complex, 1921 W Gate City Blvd, Greensboro, NC 27403

Thanks in advance for any assistance.

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
587 questions
Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
245 questions
{count} votes

1 answer

Sort by: Most helpful
  1. IoTGirl 2,976 Reputation points Microsoft Employee
    2022-05-17T17:55:05.733+00:00

    Hi @cdickins ,

    I have forwarded your repro to the routing team and they confirm that ‘Avoid Tolls’ option does not automatically apply when other avoid options are used. For optimization purpose, we use a different routing algorithm when avoid options are set, and in this particular case there’s seems to be another factor that is changing the route. The team will review your steps and see what else might be impacting this result.

    Sincerely,
    IoTGirl

    1 person found this answer helpful.
    0 comments No comments