...
In the Received payload you will get the Geocodes path coordinates -> longitude and latitude.
{ "features": [ { "properties": { "feature_type": "address", "full_address": "110 Washington Street, Saint Francis, Kansas 67756, United States", "name": "110 Washington Street", "name_preferred": "110 Washington Street", "coordinates": { "longitude": -101.800868, "latitude": 39.77444, "accuracy": "rooftop", "routable_points": [...] // 1 items }, |
Get the Address by Geocode
...
In the Payload, you will get the full_address, and context there you will get the address, street, postcode, place, district, region, and country.
{ "features": [ { "properties": { "feature_type": "address", "full_address": "110 Washington Street, Saint Francis, Kansas 67756, United States", "name": "110 Washington Street", "name_preferred": "110 Washington Street", "coordinates": {...}, // 4 keys "place_formatted": "Saint Francis, Kansas 67756, United States", "context": { "address": { "address_number": "110", "street_name": "Washington Street", "name": "110 Washington Street" }, "street": { "name": "Washington Street" }, "postcode": { "name": "67756" }, "place": { "name": "Saint Francis" }, "district": { "name": "Cheyenne County" }, "region": { "name": "Kansas", "region_code": "KS", "region_code_full": "US-KS" }, "country": { "name": "United States", "country_code": "US", "country_code_alpha_3": "USA" } } } } ] } |
Get Directions
You have to enter the Latitude and Longitude of both Origin and Destination. The Distance is in meters and the duration is in seconds.
...
Legs ->Waypoints which are directions from origin to direction.
{ "routes": [ { "weight_name": "auto", "weight": 1514.084, "duration": 1611.287, "distance": 36982.594, "legs": [ { "admins": [ { "iso_3166_1_alpha3": "USA", "iso_3166_1": "US" } ], "weight": 1514.084, "duration": 1611.287, "distance": 36982.594, "summary": "TX 70, Farm to Market Road 57" } ] } ], "waypoints": [ { "distance": 12.3, "location": [ -100.407636, 32.471248 ] }, { "distance": 3.034, "name": "Farm to Market Road 57", "location": [ -100.253785, 32.721094 ] } ], "code": "Ok", "uuid": "T5m9XsITk8v43iczgJieSLlVKxksfje-2zgIGqC5NHYQjy8OlMRkVw==" } |