Created
January 24, 2019 00:01
-
-
Save admicaa/0c7de64a97ba53524920bc4f995a2adb to your computer and use it in GitHub Desktop.
google map request example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // here is the request | |
| // https://maps.googleapis.com/maps/api/geocode/json?address=Winnetka&key=YOUR_API_KEY | |
| // the response would be | |
| { | |
| "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" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment