Is Google response format changed? Starting a few days, when I request an API with the place_id parameter corresponding to the country, I no longer receive the country code (alpha2).
For instance:
# Query for "France" # http://maps.googleapis.com/maps/api/js/GeocodeService.Search?7sUS&9sen&14sChIJMVd4MymgVA0R99lHx5Y__Ws&key=[API_KEY] "results" : [ { "address_components" : [ { "long_name" : "France", "short_name" : "France", <= Used to be "FR" "types" : [ "country", "political" ] } ], "formatted_address" : "France", .... }, "place_id" : "ChIJMVd4MymgVA0R99lHx5Y__Ws", "types" : [ "country", "political" ] } ], "status" : "OK" }
But when I fulfill the same request for Paris, France:
"results" : [ { "address_components" : [ { "long_name" : "Paris", "short_name" : "Paris", "types" : [ "locality", "political" ] }, { "long_name" : "Paris", "short_name" : "Paris", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Île-de-France", "short_name" : "Île-de-France", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "France", "short_name" : "FR", <== Still "FR" "types" : [ "country", "political" ] } ], "formatted_address" : "Paris, France", "geometry" : { "bounds" : { "northeast" : { "lat" : 48.9021449, "lng" : 2.4699208 }, "southwest" : { "lat" : 48.815573, "lng" : 2.224199 } }, "location" : { "lat" : 48.856614, "lng" : 2.3522219 }, "location_type" : "APPROXIMATE", "viewport" : { "northeast" : { "lat" : 48.9021449, "lng" : 2.4699208 }, "southwest" : { "lat" : 48.815573, "lng" : 2.225193 } } }, "place_id" : "ChIJD7fiBh9u5kcRYJSMaMOCCwQ", "types" : [ "locality", "political" ] } ], "status" : "OK" } )
Has this really changed? If so, how can I get the appropriate country_code for the country request?
thanks for the help