Google Maps API region parameter for postcode search - google-maps

I want to use Google Maps API to get the coordinates of a postcode.
I am using this documentation: https://developers.google.com/maps/documentation/geocoding/intro?csw=1
When I now want to search for the postcode 1200 (Genève in Switzerland) I use this URL:
https://maps.google.com/maps/api/geocode/json?region=ch&components=postal_code:1200
I get alot of different results, but none in Switzerland (Results of this are at the end of the question). It looks like the region parameter does not work at all because I get results in other counrtys.
When I search for 1201 (also Genève) it works.
Any idea why? I would rather get not any result then wrong results (results in other countries)
{
"results" : [
{
"address_components" : [
{
"long_name" : "1200",
"short_name" : "1200",
"types" : [ "postal_code" ]
},
{
"long_name" : "Region Brüssel-Hauptstadt",
"short_name" : "Region Brüssel-Hauptstadt",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Belgien",
"short_name" : "BE",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "1200, Belgien",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 50.86307189999999,
"lng" : 4.4629024
},
"southwest" : {
"lat" : 50.8337598,
"lng" : 4.3999935
}
},
"location" : {
"lat" : 50.850308,
"lng" : 4.4278228
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 50.86307189999999,
"lng" : 4.4629024
},
"southwest" : {
"lat" : 50.8337598,
"lng" : 4.3999935
}
}
},
"place_id" : "ChIJNa8iqqHcw0cRG4NyYbv66KY",
"types" : [ "postal_code" ]
},
{
"address_components" : [
{
"long_name" : "1200",
"short_name" : "1200",
"types" : [ "postal_code" ]
},
{
"long_name" : "Wien",
"short_name" : "Wien",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Wien",
"short_name" : "Wien",
"types" : [ "postal_town" ]
},
{
"long_name" : "Wien",
"short_name" : "Wien",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Österreich",
"short_name" : "AT",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "1200 Wien, Österreich",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 48.2646423,
"lng" : 16.4007913
},
"southwest" : {
"lat" : 48.2252299,
"lng" : 16.3618448
}
},
"location" : {
"lat" : 48.235668,
"lng" : 16.373098
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 48.2646423,
"lng" : 16.4007913
},
"southwest" : {
"lat" : 48.2252299,
"lng" : 16.3618448
}
}
},
"place_id" : "ChIJs0PDoUQGbUcRI9VvmpZbVzQ",
"types" : [ "postal_code" ]
},
{
"address_components" : [
{
"long_name" : "1200",
"short_name" : "1200",
"types" : [ "postal_code", "postal_code_prefix" ]
},
{
"long_name" : "Lissabon",
"short_name" : "Lissabon",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Lissabon",
"short_name" : "Lissabon",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Portugal",
"short_name" : "PT",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "1200 Lissabon, Portugal",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 38.7177413,
"lng" : -9.1387655
},
"southwest" : {
"lat" : 38.7006072,
"lng" : -9.168078299999999
}
},
"location" : {
"lat" : 38.7096083,
"lng" : -9.1539178
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 38.7177413,
"lng" : -9.1387655
},
"southwest" : {
"lat" : 38.7006072,
"lng" : -9.168078299999999
}
}
},
"place_id" : "ChIJT3JAUYI0GQ0R4Nc7DsHrABw",
"types" : [ "postal_code", "postal_code_prefix" ]
},
{
"address_components" : [
{
"long_name" : "1200",
"short_name" : "1200",
"types" : [ "postal_code" ]
},
{
"long_name" : "Mbombela",
"short_name" : "Mbombela",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Mbombela",
"short_name" : "Mbombela",
"types" : [ "administrative_area_level_3", "political" ]
},
{
"long_name" : "Ehlanzeni",
"short_name" : "Ehlanzeni",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "Mpumalanga",
"short_name" : "MP",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Südafrika",
"short_name" : "ZA",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Mbombela, 1200, Südafrika",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : -25.434559,
"lng" : 31.035606
},
"southwest" : {
"lat" : -25.5273621,
"lng" : 30.9615131
}
},
"location" : {
"lat" : -25.4922163,
"lng" : 31.0048384
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : -25.434559,
"lng" : 31.035606
},
"southwest" : {
"lat" : -25.5273621,
"lng" : 30.9615131
}
}
},
"place_id" : "ChIJC-Upoo1J6B4RbhfORqGdY2s",
"types" : [ "postal_code" ]
},
{
"address_components" : [
{
"long_name" : "1200",
"short_name" : "1200",
"types" : [ "postal_code" ]
},
{
"long_name" : "København K",
"short_name" : "København K",
"types" : [ "political", "sublocality", "sublocality_level_1" ]
},
{
"long_name" : "København",
"short_name" : "København",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Dänemark",
"short_name" : "DK",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "1200 København K, Dänemark",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 55.6788537,
"lng" : 12.581048
},
"southwest" : {
"lat" : 55.6774083,
"lng" : 12.5790574
}
},
"location" : {
"lat" : 55.6780957,
"lng" : 12.5799054
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 55.6794799802915,
"lng" : 12.5814016802915
},
"southwest" : {
"lat" : 55.6767820197085,
"lng" : 12.5787037197085
}
}
},
"place_id" : "ChIJuYvG1hZTUkYREL3-tlYomQk",
"types" : [ "postal_code" ]
}
],
"status" : "OK"
}

Like duncan said, the region code will only influence, not fully restrict, results from the geocoder. To know more about it, check the region biasing.
If you want specific results in a country, then use the component=country instead of a region.
I tried to request the postal_code:1200 in the country Switzerland. And I get zero results. So make that the request that you are using is valid.
https://maps.google.com/maps/api/geocode/json?components=postal_code:1200|country:CH
And if I tried the postal_code:1201, I get the specific results that you want.
https://maps.google.com/maps/api/geocode/json?components=postal_code:1201|country:CH
If you are sure that the postal_code:1200 is valid postal code in Switzerland, then maybe that postal_code is not considered the postal code for Geneva, Switzerland by the Google Maps.
Try to also to check this related SO question that I answered.

Related

Google Geocode API: 'administrative_area:in|country:US' Not Found

Why does this find Indiana:
https://maps.google.com/maps/api/geocode/json?components=administrative_area:in
But this does not?
https://maps.google.com/maps/api/geocode/json?components=administrative_area:in|country:US
It works fine if you use ind instead of a in.
https://maps.google.com/maps/api/geocode/json?components=country:US|administrative_area:ind&key=
{
"results" : [
{
"address_components" : [
{
"long_name" : "Indiana",
"short_name" : "IN",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Indiana, USA",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 41.761368,
"lng" : -84.784662
},
"southwest" : {
"lat" : 37.7717419,
"lng" : -88.097892
}
},
"location" : {
"lat" : 40.2671941,
"lng" : -86.1349019
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 41.761368,
"lng" : -84.784662
},
"southwest" : {
"lat" : 37.7717419,
"lng" : -88.097892
}
}
},
"place_id" : "ChIJHRv42bxQa4gRcuwyy84vEH4",
"types" : [ "administrative_area_level_1", "political" ]
}
],
"status" : "OK"

Use fields specifier for maps.googleapis?

I'm trying to get a subset of the json return from a maps.googleapis call. Specifically the location which is in the body of the current return below:
"location" : {
"lat" : 44.0581728,
"lng" : -121.3153096
}
If I make a get request to: http://maps.googleapis.com/maps/api/geocode/json?address=bend&sensor=false
This is the result:
{
"results" : [
{
"address_components" : [
{
"long_name" : "Bend",
"short_name" : "Bend",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Deschutes County",
"short_name" : "Deschutes County",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "Oregon",
"short_name" : "OR",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Bend, OR, USA",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 44.1231839,
"lng" : -121.248579
},
"southwest" : {
"lat" : 43.999089,
"lng" : -121.3807099
}
},
"location" : {
"lat" : 44.0581728,
"lng" : -121.3153096
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 44.1231839,
"lng" : -121.248579
},
"southwest" : {
"lat" : 43.999089,
"lng" : -121.3807099
}
}
},
"place_id" : "ChIJUdLTpf_AuFQRtNEgx6zniBA",
"types" : [ "locality", "political" ]
}
],
"status" : "OK"
}
I tried adding &fields=location to the get request but it returns the same info. I don't see a clear method of doing this on https://developers.google.com/maps/documentation/geocoding/intro#GeocodingRequests
Any help appreciated!
Thanks!
The location you need is present in the geometry. The JSON object has location property under geometry field.

google maps geocoder not returning locality

My geocoder used to work fine, but now it only returns the county, state and country. According to the docs (https://developers.google.com/maps/documentation/geocoding/intro), the geocoder should return locality (city).
SEARCHING "Winnetka"...
EXPECTED RESULTS:
{
"results" : [
{
"address_components" : [
{
"long_name" : "Winnetka",
"short_name" : "Winnetka",
"types" : [ "locality", "political" ]
},
{
"long_name" : "New Trier",
"short_name" : "New Trier",
"types" : [ "administrative_area_level_3", "political" ]
},
{
"long_name" : "Cook County",
"short_name" : "Cook County",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "Illinois",
"short_name" : "IL",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Winnetka, IL, USA",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 42.1282269,
"lng" : -87.7108162
},
"southwest" : {
"lat" : 42.0886089,
"lng" : -87.7708629
}
},
"location" : {
"lat" : 42.10808340000001,
"lng" : -87.735895
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 42.1282269,
"lng" : -87.7108162
},
"southwest" : {
"lat" : 42.0886089,
"lng" : -87.7708629
}
}
},
"place_id" : "ChIJW8Va5TnED4gRY91Ng47qy3Q",
"types" : [ "locality", "political" ]
}
],
"status" : "OK"
}
ACTUAL RESULTS:
{
"results" : [
{
"address_components" : [
{
"long_name" : "New Trier Township",
"short_name" : "New Trier Township",
"types" : [ "administrative_area_level_3", "political" ]
},
{
"long_name" : "Cook County",
"short_name" : "Cook County",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "Illinois",
"short_name" : "IL",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "New Trier Township, IL, USA",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 42.1282269,
"lng" : -87.71080979999999
},
"southwest" : {
"lat" : 42.0886089,
"lng" : -87.7708629
}
},
"location" : {
"lat" : 42.10808340000001,
"lng" : -87.735895
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 42.1282269,
"lng" : -87.7108162
},
"southwest" : {
"lat" : 42.0886089,
"lng" : -87.7708629
}
}
},
"place_id" : "ChIJW8Va5TnED4gRY91Ng47qy3Q",
"types" : [ "locality", "political" ]
}
],
"status" : "OK"
}
I am in the same boat as you. The level at which you are searching is not being returned. If you search for a locality, it is missing. If you search for administrative_area_level_1, it is missing.
#geocodezip in another question with the same problem thinks it is server specific. This happens sometimes, usually when google is making a change apparently. It is really hurting me right now though so hopefully it gets resolved soon.

How to get the address from the json that is returned by googleapi

How can I get the address from the json that google-api returns
Here is my request url, I didn't included the api in the example url i provided
Here is the example url:
https://maps.googleapis.com/maps/api/geocode/json?latlng=55.567,56.786&key=xyz
How can i get the formatted address that is retured by the google json ?
Here is my json
{
"results" : [
{
"address_components" : [
{
"long_name" : "452377",
"short_name" : "452377",
"types" : [ "postal_code" ]
},
{
"long_name" : "Republic of Bashkortostan",
"short_name" : "Republic of Bashkortostan",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Russia",
"short_name" : "RU",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Republic of Bashkortostan, Russia, 452377",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 55.655173,
"lng" : 57.0644709
},
"southwest" : {
"lat" : 55.36128,
"lng" : 56.6011809
}
},
"location" : {
"lat" : 55.50385139999999,
"lng" : 56.900913
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 55.655173,
"lng" : 57.0644709
},
"southwest" : {
"lat" : 55.36128,
"lng" : 56.6011809
}
}
},
"place_id" : "ChIJ904w9b1u3EMRc1XU4GlYSGs",
"types" : [ "postal_code" ]
},
{
"address_components" : [
{
"long_name" : "Karaidelsky District",
"short_name" : "Karaidelsky District",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "Republic of Bashkortostan",
"short_name" : "Republic of Bashkortostan",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Russia",
"short_name" : "RU",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Karaidelsky District, Republic of Bashkortostan, Russia",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 56.076375,
"lng" : 57.7045048
},
"southwest" : {
"lat" : 55.463071,
"lng" : 56.230281
}
},
"location" : {
"lat" : 55.73996589999999,
"lng" : 56.8548154
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 56.076375,
"lng" : 57.7045048
},
"southwest" : {
"lat" : 55.463071,
"lng" : 56.230281
}
}
},
"place_id" : "ChIJCQ7oNrlx3EMRbyb2O6_k5OY",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"address_components" : [
{
"long_name" : "Republic of Bashkortostan",
"short_name" : "Republic of Bashkortostan",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Russia",
"short_name" : "RU",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Republic of Bashkortostan, Russia",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 56.53352,
"lng" : 60.00295010000001
},
"southwest" : {
"lat" : 51.57122589999999,
"lng" : 53.1579969
}
},
"location" : {
"lat" : 54.2312172,
"lng" : 56.1645257
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 56.53352,
"lng" : 60.00295010000001
},
"southwest" : {
"lat" : 51.57122589999999,
"lng" : 53.1579969
}
}
},
"place_id" : "ChIJ_UeUVQW02UMRNFQ0VFqKPHA",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"address_components" : [
{
"long_name" : "Russia",
"short_name" : "RU",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Russia",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 81.8581221,
"lng" : -169.045286
},
"southwest" : {
"lat" : 41.185353,
"lng" : 19.6403534
}
},
"location" : {
"lat" : 61.52401,
"lng" : 105.318756
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 70,
"lng" : 179
},
"southwest" : {
"lat" : 40,
"lng" : 27
}
}
},
"place_id" : "ChIJ-yRniZpWPEURE_YRZvj9CRQ",
"types" : [ "country", "political" ]
}
],
"status" : "OK"
}
You should use file_get_contents and then json_decode your result and you can get your required answer by results[0]->formatted_address as geocodezip suggests you.
So you should use
<?php
$GoogleApiResult = file_get_contents(https://maps.googleapis.com/maps/api/geocode/json?latlng=55.567,56.786&key=xyz);
$GoogleApiResultDecoded = json_decode($GoogleApiResult);
echo $GoogleApiResultDecoded->results[0]->formatted_address;
?>

JSON status code 610

I was obtaining the street, city and country details by passing the latitde and longitude values to the following URL: http://maps.google.com/maps/geo?q="+la+","+lo;. However, this has suddenly stopped working as I now get a returned status code 610 instead of 200. I googled and I came across the fact that Google has deprecated the older version with version V3 and the recommended use is to update to this version. The new URL will be something like this;
http://maps.googleapis.com/maps/api/geocode/json?latlng=25.34041,-55.489864&sensor=false
However, I am completely at lost how to use this? What is the Google API Key? Where should I obtain this from. Earlier I was using the above mentioned URL and imported the following into my project:
import org.json.me.JSONArray;
import org.json.me.JSONObject;
Please help how to proceed with this?
You are requesting a correct URL but your latlong values may be invalid.
I request URL:
http://maps.googleapis.com/maps/api/geocode/json?latlng=25.34041,-55.489864&sensor=false
Results.
{
"results" : [],
"status" : "ZERO_RESULTS"
}
Requested with differnt latlong but same URL:
http://maps.googleapis.com/maps/api/geocode/xml?latlng=51.962146,7.602304&sensor=false"
{
"results" : [
{
"address_components" : [
{
"long_name" : "Rishon-Le-Zion-Ring",
"short_name" : "K6",
"types" : [ "route" ]
},
{
"long_name" : "Münster",
"short_name" : "Münster",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Münster",
"short_name" : "Münster",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "North Rhine-Westphalia",
"short_name" : "NRW",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Germany",
"short_name" : "DE",
"types" : [ "country", "political" ]
},
{
"long_name" : "48149",
"short_name" : "48149",
"types" : [ "postal_code" ]
}
],
"formatted_address" : "Rishon-Le-Zion-Ring, 48149 Münster, Germany",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 51.96354080,
"lng" : 7.602404200000001
},
"southwest" : {
"lat" : 51.96109890,
"lng" : 7.601790299999998
}
},
"location" : {
"lat" : 51.96233620,
"lng" : 7.602270099999999
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 51.96366883029150,
"lng" : 7.603446230291501
},
"southwest" : {
"lat" : 51.96097086970850,
"lng" : 7.600748269708497
}
}
},
"types" : [ "route" ]
},
{
"address_components" : [
{
"long_name" : "48149",
"short_name" : "48149",
"types" : [ "postal_code" ]
},
{
"long_name" : "Münster",
"short_name" : "Münster",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Münster",
"short_name" : "Münster",
"types" : [ "administrative_area_level_3", "political" ]
},
{
"long_name" : "Münster",
"short_name" : "Münster",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "North Rhine-Westphalia",
"short_name" : "NRW",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Germany",
"short_name" : "DE",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "48149 Münster, Germany",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 51.9846220,
"lng" : 7.6245910
},
"southwest" : {
"lat" : 51.9381030,
"lng" : 7.57505310
}
},
"location" : {
"lat" : 51.96236820,
"lng" : 7.595598700000001
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 51.9846220,
"lng" : 7.6245910
},
"southwest" : {
"lat" : 51.9381030,
"lng" : 7.57505310
}
}
},
"types" : [ "postal_code" ]
},
{
"address_components" : [
{
"long_name" : "Münster",
"short_name" : "Münster",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Münster",
"short_name" : "Münster",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "North Rhine-Westphalia",
"short_name" : "NRW",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Germany",
"short_name" : "DE",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Münster, Germany",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 52.06001970,
"lng" : 7.774361699999999
},
"southwest" : {
"lat" : 51.84015110000001,
"lng" : 7.473832599999999
}
},
"location" : {
"lat" : 51.96066490,
"lng" : 7.62613470
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 52.06001970,
"lng" : 7.774361699999999
},
"southwest" : {
"lat" : 51.84015110000001,
"lng" : 7.473832599999999
}
}
},
"types" : [ "locality", "political" ]
},
{
"address_components" : [
{
"long_name" : "Münster",
"short_name" : "Münster",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "North Rhine-Westphalia",
"short_name" : "NRW",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Germany",
"short_name" : "DE",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Münster, Germany",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 52.47498539999999,
"lng" : 8.320101899999999
},
"southwest" : {
"lat" : 51.48078280,
"lng" : 6.386867199999999
}
},
"location" : {
"lat" : 51.94711969999999,
"lng" : 7.584531999999999
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 52.47498539999999,
"lng" : 8.320101899999999
},
"southwest" : {
"lat" : 51.48078280,
"lng" : 6.386867199999999
}
}
},
"types" : [ "administrative_area_level_2", "political" ]
},
{
"address_components" : [
{
"long_name" : "North Rhine-Westphalia",
"short_name" : "NRW",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Germany",
"short_name" : "DE",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "North Rhine-Westphalia, Germany",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 52.53146959999999,
"lng" : 9.461634900000002
},
"southwest" : {
"lat" : 50.3227010,
"lng" : 5.86634250
}
},
"location" : {
"lat" : 51.43323669999999,
"lng" : 7.661593799999999
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 52.53146959999999,
"lng" : 9.461634900000002
},
"southwest" : {
"lat" : 50.3227010,
"lng" : 5.86634250
}
}
},
"types" : [ "administrative_area_level_1", "political" ]
},
{
"address_components" : [
{
"long_name" : "Germany",
"short_name" : "DE",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Germany",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 55.0583470,
"lng" : 15.04189620
},
"southwest" : {
"lat" : 47.27011150,
"lng" : 5.86634250
}
},
"location" : {
"lat" : 51.1656910,
"lng" : 10.4515260
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 55.0583470,
"lng" : 15.04189620
},
"southwest" : {
"lat" : 47.27011150,
"lng" : 5.86634250
}
}
},
"types" : [ "country", "political" ]
}
],
"status" : "OK"
}