BingMapsAPI: avoid passing Switzerland for calculation

Peii Lu 1 Reputation point
2021-05-25T10:27:15.267+00:00

Hi there,

We are using BingMaps API as our tool to calculate the distance in Europe.
We would like to avoid passing Switzerland in our calculation.
From your blog saying BingMaps can only avoid country crossing border in US and CA.
Is there any update or possible for request to avoid passing Switzerland?

Look forward to hearing from you, thanks!

Kind regards,
Peii

Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
257 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. IoTGirl 3,206 Reputation points Microsoft Employee
    2021-05-28T21:50:11.89+00:00

    Hi PeiiLu,

    You are using "avoid":"borderCrossing" and it is not working for you? Can you give a sample call that is failing? Calculate a route API or Calculate a truck route API?

    Both APIs support avoid=borderCrossing, but there is more support for borderRestriction using Calculate a truck route API.

    Sincerely,
    IoTGirl

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.