Reverse Geocode
Table of Contents
Overview
The zoho.map.rGeoCode task returns the address of the specified GPS coordinates (latitude and longitude).
- Zoho Maps use open-source address data. Hence, accuracy might not be on par with commercial vendors.
- This task cannot be used in AU domain as Zoho Maps is not available for AU users.
Syntax
<response> = zoho.map.rGeoCode(<latitude>, <longitude>);
where:
Params | Data type | Description |
<response> | KEY-VALUE | The address of the specified location, and the status of the executed task. |
<latitude> | NUMBER | The latitude of the address that needs to be obtained. |
<longitude> | NUMBER | The longitude of the address that needs to be obtained. |
Example
The following script returns the address of the specified location using its latitude and longitude:
response = zoho.map.rGeoCode(12.8311007, 80.0494381542286);
where:
response
12.8311007
80.0494381542286
Response Format
Success Response
The success response will be returned in the following format:
{
"country": "India",
"country_code": "in",
"address": "Bucket Building, Grand Southern Trunk Road, Vardhaman Nagar, Guduvancheri, Potheri, Kanchipuram district, Tamil Nadu, 603202, India","road": "Grand Southern Trunk Road",
"state_district": "Kanchipuram district",
"neighbourhood": "Vardhaman Nagar",
"postcode": "603202",
"suburb": "Guduvancheri",
"state": "Tamil Nadu",
"village": "Potheri",
"building": "Bucket Building",
"status": "success"
}
Failure Response
The failure response for an undetectable latitude and longitude values will be returned in the following format:
{
"error": "unable to geocode",
"status": "failure"
}