我目前正在使用 Google Geocoder API 来确定我的网络服务的位置数据。获取给定国家和城市的邮政编码对我来说很重要,但谷歌似乎限制了结果。
这是 API 调用:
结果是这样的:
{
"results" : [
{
"address_components" : [
{
"long_name" : "Saarlouis",
"short_name" : "Saarlouis",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Landkreis Saarlouis",
"short_name" : "Landkreis Saarlouis",
"types" : [ "administrative_area_level_3", "political" ]
},
{
"long_name" : "Saarland",
"short_name" : "SL",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Deutschland",
"short_name" : "DE",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Saarlouis, Deutschland",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 49.36187570,
"lng" : 6.815549499999999
},
"southwest" : {
"lat" : 49.26046930,
"lng" : 6.67501510
}
},
"location" : {
"lat" : 49.31346060,
"lng" : 6.752286499999999
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 49.36187570,
"lng" : 6.815549499999999
},
"southwest" : {
"lat" : 49.26046930,
"lng" : 6.67501510
}
}
},
"types" : [ "locality", "political" ]
}
],
"status" : "OK"
}
谢谢帮助。
问候