Latlong from Address

Is it possible to pull the relevant latlong coordinates into the latlong column type from a address column type?

Unfortunately, Geocoding is not currently available.

1 Like

Thanks.
Maybe appsheets new connection with Google might bring in some quick added value :wink:

1 Like

We can only hope!

Not sure if this will help anyone but here is an Apps Script you can use to convert Address into LatLong values:

/**

  • Returns latitude and longitude values for given address using the Google Maps Geocoder.
  • @param {string} address - The address you get the latitude and longitude for.
  • @customfunction
    */
    function GEOCODE_GOOGLE(address) {
    if (address.map) {
    return address.map(GEOCODE_GOOGLE)
    } else {
    var r = Maps.newGeocoder().geocode(address)
    for (var i = 0; i < r.results.length; i++) {
    var res = r.results[i]
    return res.geometry.location.lat + ", " + res.geometry.location.lng
    }
    }
    }
2 Likes