Hi Antonio,
Can you please provide the sample call with your Bing Maps key removed?
Sincerely,
IoTGirl
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I developed an Excel tool which estimates the driving distance between two coordinates. The tool uses an API linked to Bing Maps, and the tutorial: link
I have tested the tool for many countries, and it works, but the tool fail to estimate distances in China, providing a negative distance.
The driving distance works on Bing Maps, but not on the API. For example: Start [31.2856, 120.7490], End [31.3750,120.6476].
Would you be able to help out, please?
Cheers,
Antonio
Hi Antonio,
Can you please provide the sample call with your Bing Maps key removed?
Sincerely,
IoTGirl
Hello IoTGirl,
I cannot attach Excel file here, so left as a link: https://1drv.ms/x/s!AkOoIOhz1PlvgtcRrwHmYzPx1sNizA?e=eBlFSk.
The file does not have a key, as it is attached to my account. You can get it from https://www.bingmapsportal.com/. Process explained here: https://chandoo.org/wp/distance-between-places-excel-maps-api/
There are three examples: EU to EU, China to China, and Russia to China.
I hope someone from this forum can help in understanding why Bing Maps in this API provides a negative distance whenever a coordinate in China is placed.
Cheers,
Antonio
Hi Antonio,
As you have still not provided the exact call, without the key, I am unable to assist you. Please note that the web experience uses the Browser values and locale settings which you may have neglected in your calls but without a sample of the call, outside of excel, I have no way to support your Maps API usage.
Sincerely,
IoTGirl
Hi Antonio,
You are asking for a "Distance Matrix" so that is the wrong call. Try https://learn.microsoft.com/en-us/bingmaps/rest-services/routes/calculate-a-route or http://dev.virtualearth.net/REST/V1/Routes?wp.0=39.90208, 116.718521&wp.1=31.2983, 120.5832&key={BingMapsKey}
You will note that the call you are using is expecting "Origins" meaning a list of multiple origins and Destinations so it is not for a single set.
Sincerely,
IoTGirl