Google geocoding api search with Arabic language address

陌路散爱 提交于 2019-12-11 10:48:24

问题


I am passing arabic lang search text in Google geocoding api query, but returns no result in json

string strResult="http://maps.googleapis.com/maps/api/geocode/json?address=جدة +السليمانية "&sensor=false&language=ar";

gives

{ "results" : [], "status" : "INVALID_REQUEST" }

kindly suggest the correctway of passing arabiclanguage search text in url.


回答1:


You must encode the address-part, it should be:

http://maps.googleapis.com/maps/api/geocode/json?address=%D8%AC%D8%AF%D8%A9+%2B%D8%A7%D9%84%D8%B3%D9%84%D9%8A%D9%85%D8%A7%D9%86%D9%8A%D8%A9+%22&sensor=false&language=ar

How to encode it depends on the used programming-language



来源:https://stackoverflow.com/questions/17122668/google-geocoding-api-search-with-arabic-language-address

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!