question

cdickins-4621 avatar image
0 Votes"
cdickins-4621 asked IoTGirl answered

Route API Avoid Options Throwing Off Results

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-mapswindows-maps
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @cdickins-4621 , could this be an edge case or you noticed similar behavior for different routes? This is: It looks like it always calculates the same routing independently of selecting "Avoit tolls" , "Avoid ferries" or "Avoid crossing country border" . Can you share some more examples of the same behavior?

I am not aware of the region you are calculating the route. But near me you can see that different routes show when we select different Avoid options: https://www.bing.com/maps?osid=c87fa3db-7779-42fc-9378-83911a3002a4&cp=38.483982~-8.792891&lvl=11&v=2&sV=2&form=S00027

Thanks!

0 Votes 0 ·

1 Answer

IoTGirl avatar image
1 Vote"
IoTGirl answered

Hi @cdickins-4621,

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.