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.
587 questions
Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
245 questions
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
313 questions
{count} votes

Accepted answer
  1. rbrundritt 15,231 Reputation points Microsoft Employee
    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