Using Bing Maps to calculate routes to stay within countries
Blog|25 March 2020
At times, route planning calculations can return the fastest route through a neighbouring country. In the following use case example, driving from “Mussey Township, MI” to “850 Lake Ave, Rochester, NY”, the calculation for the fastest route is via Ontario, Canada at Blue Water Bridge, and then entering New York, United States:
Bing Maps Calculate Route API
Visa requirements and custom duties mean that some drivers and vehicles need to keep their routes within the United States (for example). Using the optional parameter avoid=borderCrossing
, Bing Maps Calculate Route API can offer an alternate route, which may have a longer travel time and travel distance, but the route is kept within the United States without crossing country borders. The example map is below:
Bing Maps Truck Routing API border crossing restrictions
In addition to avoid=borderCrossing
for avoiding crossing country borders for auto and truck routes, Bing Maps now also supports customisable border crossing restrictions for the Truck Routing API. This optional borderRestriction
parameter supports specifying regions or geographic areas where border crossing should be avoided, is allowed or must be minimised.
Transport rules to consider
Transport rules can vary. Some rules may allow trucks to route through some countries while strictly prohibit the trucks from entering other countries. There may be state or federal regulations around transportation of items such as tobacco, alcohol, medicines or controlled substances across a country border or state lines.
The Bing Maps Truck Routing API can now handle these scenarios by simply setting a parameter in the API call. For this use case example, our scenario is a truck driver who needs to drive from Ashville, TN to Jacksonville, FL, with a requirement to avoid driving through the state of Georgia. Using the borderRestriction
parameter the API returns the following:
When visualised on the map below, the example without the borderRestriction
parameter shows the broken black line tracking the route through the state of Georgia. The blue line shows the route specified using the borderRestriction
parameter, with the state boundary restriction for Georgia (US-GA).
For more details on these new Bing Maps features, read the Calculate a Route API and Calculate a Truck Route API documentation.
For more information about Microsoft Bing Maps, or to discuss your use case, contact the Grey Matter team of mapping specialists. Call them direct on +44 (0)1364 655 133 or email mapping@greymatter.com
Contact Grey Matter
If you have any questions or want some extra information, complete the form below and one of the team will be in touch ASAP. If you have a specific use case, please let us know and we'll help you find the right solution faster.
By submitting this form you are agreeing to our Privacy Policy and Website Terms of Use.
Related News
[WEBINAR] Ransomware Resilience: The Role of Backup and Storage
Tue 22 October 2024 3:00 pm - 4:00 pm GMT
Safeguard your business against ransomware with backup and storage Join us for an insightful webinar during Cyber Security Awareness Month, where we delve into the critical aspects of cyber security and ransomware protection. This session will explore the importance of...
Women in Tech Roundtable Report
Grey Matter and ESET co-hosted a Women in Tech Roundtable at Wembley in June. The aim was to understand the experience of women in tech and learn how we can improve equality. We discussed various topics from imposture syndrome, flexible...
Embarcadero RAD Studio 12.2 Now Available
Embarcadero Technologies announces the General Availability of RAD Studio 12.2, including Delphi 12.2 and C++Builder 12.2 RAD Studio 12.2 introduces support for AI-powered coding, a new Webstencils template library for web development, and new 64-bit Delphi compilers for large applications;...
School Closes Due to Ransomware Attack
It has been reported that Charles Darwin School in Kent has had to close its doors to students and staff while they sort out a severe cyber incident. The school suffered a ransomware attack and is working with the ICO...