Choose where you’d like to start

Geocode

Overview

The zoho.map.geoCode task returns the GPS coordinates (latitude and longitude) of the specified address.

Note:

  • 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.geoCode(<address>);

where:

ParamsData typeDescription
<response>KEY-VALUEThe latitude and longitude of the specified location, and the status of the executed task.
<address>TEXTThe address of the location whose latitude and longitude need to be obtained.

Example

The following script returns the latitude and longitude of the specified location:

response = zoho.map.geoCode("4141 Hacienda Dr, Pleasanton, CA 94588, United States");

where:

response
The KEY-VALUE variable that holds the latitude and longitude of the specified location, and the status of the executed task.
"4141 Hacienda Dr, Pleasanton, CA 94588, United States"
The TEXT that represents the address of the location whose latitude and longitude need to be obtained.

Response Format

Success Response

  • The success response will be returned in the following format:

     {
     "latitude": "37.68612315",
     "longitude": "-121.893741811263",
     "status": "success"
     }

Failure Response

  • The failure response for an undetectable address value will be returned in the following format:

     {
     "error": "unable to geocode",
     "status": "failure"
     }

Related Links

Get Started Now

Execute