せずにJSONを返す私はhttp://maps.googleapis.com/maps/api/geocode/json?address=Alabama
からJSONを取得すると、それはあなたが見ることができるように、私は境界returnes:ジオコードは限界
{
"results" : [
{
"address_components" : [
{
"long_name" : "Alabama",
"short_name" : "AL",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Alabama, USA",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 35.008028,
"lng" : -84.888246
},
"southwest" : {
"lat" : 30.144425,
"lng" : -88.4732269
}
},
"location" : {
"lat" : 32.3182314,
"lng" : -86.902298
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 35.008028,
"lng" : -84.888246
},
"southwest" : {
"lat" : 30.144425,
"lng" : -88.4732269
}
}
},
"place_id" : "ChIJdf5LHzR_hogR6czIUzU0VV4",
"types" : [ "administrative_area_level_1", "political" ]
}
],
"status" : "OK"
}
が、私はアラスカの代わりに、アラバマhttp://maps.googleapis.com/maps/api/geocode/json?address=Alaska
が
{
"results" : [
{
"address_components" : [
{
"long_name" : "700",
"short_name" : "700",
"types" : [ "street_number" ]
},
{
"long_name" : "East 46th Avenue",
"short_name" : "E 46th Ave",
"types" : [ "route" ]
},
{
"long_name" : "Midtown",
"short_name" : "Midtown",
"types" : [ "neighborhood", "political" ]
},
{
"long_name" : "Anchorage",
"short_name" : "Anchorage",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Anchorage",
"short_name" : "Anchorage",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "Alaska",
"short_name" : "AK",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
},
{
"long_name" : "99503",
"short_name" : "99503",
"types" : [ "postal_code" ]
},
{
"long_name" : "7402",
"short_name" : "7402",
"types" : [ "postal_code_suffix" ]
}
],
"formatted_address" : "700 E 46th Ave, Anchorage, AK 99503, USA",
"geometry" : {
"location" : {
"lat" : 61.1789309,
"lng" : -149.870464
},
"location_type" : "ROOFTOP",
"viewport" : {
"northeast" : {
"lat" : 61.1802798802915,
"lng" : -149.8691150197085
},
"southwest" : {
"lat" : 61.17758191970849,
"lng" : -149.8718129802915
}
}
},
"place_id" : "ChIJ1QZWYr2XyFYR1-572SNQDyI",
"types" : [ "car_wash", "establishment", "finance", "point_of_interest" ]
}
],
"status" : "OK"
}
を入力するとJSONで"bounds"
ではない、なぜ、私は境界が必要なので、私はアメリカの州の特定の場所を検索することができます。 違いは何か、これは他のいくつかの州で起こります。 私は境界の代わりにビューポートを使用しようとしましたが、再びアラバマ州では動作しますが、アラスカ州ではアンカレッジの中心を指しています。
ありがとう、これは私が探していたものです! –