Bing Maps REST Services: escaping address parameters of Locations API (geocoding) fails in Beijing, China

Allen Tse 21 Reputation points
2022-04-02T03:38:49.223+00:00

I have read https://social.msdn.microsoft.com/forums/en-US/8671a641-2aff-4a59-8090-e21f1b8b7da7/
I can successfully parse a location in US with ASCII address, and URL also seems correct with the the address in Deutsch like
http://dev.virtualearth.net/REST/v1/Locations?key=...&addressLine=L%C3%A4nder%C3%B6schstr.72&countryRegion=Deutschland

However, in my case, it is Chinese and I can only get response of Beijing, instead of the detailed position of 动物园/zoo, to
GET http://dev.virtualearth.net/REST/v1/Locations?key=...&addressLine=%E5%8A%A8%E7%89%A9%E5%9B%AD&countryRegion=CN&locality=Beijing

Thanks in advance.

BTW lastly, I have to add tags to post, however I am not sure at all whether mine are correct for maps and rest-api, though they are the only I can find out.

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
832 questions
Windows for home Windows 11 Apps
Microsoft Partner Center API
{count} votes

Accepted answer
  1. rbrundritt 20,836 Reputation points Microsoft Employee Moderator
    2022-04-14T19:00:17.687+00:00

    The issue looks to be that you are using a mix of languages in your query and not specifying a culture code in the request. Adding "&culture=zh-CN" returns a result for the zoo in Chinese.


0 additional answers

Sort by: Most helpful

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.