google maps api
Just found out this… typed my city in change.org, and it filled out the city, state and country… I was amazed. Looking at the network panel, found out this call: http://maps.googleapis.com/maps/api/js/GeocodeService.Search?4sporto%20alegre&7sbr&9sen-US&callback=_xdc_._t9nhk5&token=32861 And opening this on a new tab, checked this result:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
_xdc_._t9nhk5 && _xdc_._t9nhk5( { "results" : [ { "address_components" : [ { "long_name" : "Porto Alegre", "short_name" : "Porto Alegre", "types" : [ "locality", "political" ] }, { "long_name" : "Rio Grande do Sul", "short_name" : "RS", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "Brazil", "short_name" : "BR", "types" : [ "country", "political" ] } ], "formatted_address" : "Porto Alegre - Rio Grande do Sul, Brazil", "geometry" : { "bounds" : { "northeast" : { "lat" : -29.93063560, "lng" : -51.0124710 }, "southwest" : { "lat" : -30.26880690, "lng" : -51.30614780 } }, "location" : { "lat" : -30.02770410, "lng" : -51.22873460 }, "location_type" : "APPROXIMATE", "viewport" : { "northeast" : { "lat" : -29.93063560, "lng" : -51.0124710 }, "southwest" : { "lat" : -30.26880690, "lng" : -51.30614780 } } }, "types" : [ "locality", "political" ] } ], "status" <code>: "OK" } ) |
Checking the formatted_address part, and I have the full address. I can then [...]