Skip to content

Instantly share code, notes, and snippets.

@gustavompo
Last active April 28, 2016 21:15
Show Gist options
  • Save gustavompo/82cc79ece948b093367d05603d2ca7d0 to your computer and use it in GitHub Desktop.
Save gustavompo/82cc79ece948b093367d05603d2ca7d0 to your computer and use it in GitHub Desktop.
Specification of the result of the reverse geocode
{
/* The array containing all the results (the amount of results is the same as the amout of requested items in the query string) */
"results": [{
/*The id informed in the request (for example location.0.id=firstItem)*/
"id": "firstItem",
/*Address with all attributes obtained for this specific item (not all attributes are always returned)*/
"address": {
"country": {
/* The ISO 3166-1 alpha-2 code for the country of the result */
"countryCode": "BRA"
},
"state": {
/* Name or abbreviation for the state */
"name": "Rj"
},
"city": {
/* Name of the city */
"name": "Niterói"
},
"district": {
/* Name of the city subdivision (district) */
"name": "Engenhoca"
},
/* Address attributes */
"addressLine": {
"houseNumber": "1139",
/* GeoJSON object for the obtained address (geojson.org/geojson-spec.html) */
"location": {
"type": "Point",
/* As the GeoJSON specification, X, Y (longitude, latitude) */
"coordinates": [-43.094512, -22.872457]
},
/* Street, Road name */
"name": "Avenida Professor João Brasil"
},
/* (optional) postal code */
"postalCode": "24110-491",
/* (optional) speed of the road */
"roadSpeed": 37.0,
/* distance to the informed coordinate */
"distance": 0.0,
/* formatted name, composed by the address attributes */
"displayName": "Avenida Professor João Brasil, 1139 - Engenhoca, Niterói - RJ"
}
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment