为反向地理编码设置语言 Gmaps v.3

3

有人知道如何设置反向地理编码 PHP 响应的语言吗?(始终设置为英文)

**Here is the code**
<code>
$api_key = "***";

$url = 'http://maps.google.com/maps/geo?q=49.8411860,30.1066580&output=json&sensor=true_or_false&key=' . $api_key.'&language=uk';

$data = @file_get_contents($url);

$jsondata = json_decode($data,true);

if(is_array($jsondata )&& $jsondata ['Status']['code']==200) {
      $addr = $jsondata ['Placemark'][0]['address'];
}

echo $addr;
</code>
**The Output is**

"L'va Tolstoho street, Bila Tserkva, Kyivs'ka oblast, Ukraine"
1个回答

2

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接