【发布时间】:2014-09-12 11:57:28
【问题描述】:
我是 google api 的新手。 我试图使用这个来获取搜索关键字的完整地址
http://maps.googleapis.com/maps/api/geocode/json?address=surat&sensor=false
使用这个我得到了这样的结果
{
"results" : [
{
"address_components" : [
{
"long_name" : "Surat",
"short_name" : "Surat",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Surat",
"short_name" : "Surat",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "Gujarat",
"short_name" : "GJ",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "India",
"short_name" : "IN",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Surat, Gujarat, India",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 21.2705834,
"lng" : 72.9432106
},
"southwest" : {
"lat" : 21.0478169,
"lng" : 72.70155579999999
}
},
"location" : {
"lat" : 21.1702401,
"lng" : 72.83106070000001
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 21.2705834,
"lng" : 72.9432106
},
"southwest" : {
"lat" : 21.0478169,
"lng" : 72.70155579999999
}
}
},
"types" : [ "locality", "political" ]
}
],
"status" : "OK"
}
所以我得到了地址,但我想要当地语言的地址。
例如,上面我想要印地语地址,但如果我搜索柏林,那么我想要德语地址。
有谁知道这是怎么可能的。
谢谢。
【问题讨论】:
标签: google-api geocode