Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps 使用阿拉伯语地址的Google地理编码api搜索_Google Maps_Google Geocoding Api - Fatal编程技术网

Google maps 使用阿拉伯语地址的Google地理编码api搜索

Google maps 使用阿拉伯语地址的Google地理编码api搜索,google-maps,google-geocoding-api,Google Maps,Google Geocoding Api,我在谷歌地理编码api查询中传递阿拉伯语lang搜索文本,但在json中不返回任何结果 字符串strResult=”http://maps.googleapis.com/maps/api/geocode/json?address=“传感器=假,语言=ar” 给予 { “结果”:[], “状态”:“无效的请求” } 请建议在url中传递阿拉伯语言搜索文本的正确方式。您必须对地址部分进行编码,它应该是: http://maps.googleapis.com/maps/api/geocode/json

我在谷歌地理编码api查询中传递阿拉伯语lang搜索文本,但在json中不返回任何结果

字符串strResult=”http://maps.googleapis.com/maps/api/geocode/json?address=“传感器=假,语言=ar”

给予

{ “结果”:[], “状态”:“无效的请求” }


请建议在url中传递阿拉伯语言搜索文本的正确方式。

您必须对地址部分进行编码,它应该是:

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
如何编码它取决于使用的编程语言

我使用的是c语言,String TestString=cityname++“++”+distname;String EncodedString=Server.HtmlEncode(TestString);仍然没有结果。我想一定是(我不熟悉c)