Address Sort via LatLong
I have an address column that shows accurately on a maps view. I would like to sort the columns in a table view by not the address (sequential) but by the geolocation of address. Using a VC and an AppFormula how would I convert the address into a LatLong? Possibly HERE([Address]) => GeoCode of address
@Buglouse Right now thereโs not a way to convert addresses to latlong types. This is on our todo list.
The only workaround is to use a script or sheet formulas. Hereโs an example that I havenโt tried yet: http://willgeary.github.io/data/2016/11/04/Geocoding-with-Google-Sheets.html
Is there an update to this?
Probably you need to support my recent feature request I posted here.
Currently it is not possible to convert the address onto latlong with Appsheet expression. Scripting using Google Map API or other API can manage.
Hello @tony. How about in reverse situation. I want to convert latlong data into an address. Is it possible?
@daw7 Not yet possible in AppSheet, but you might be able to work with an external tool to do this.
Thank you @tony. I found a solution to my issue. Instead of extracting address value from a latlong data (or vice versa), I made a separate form and let the user input both the latlong and the adddress data. In that way I can now show the address as a text for display purposes and the latlong value as the exact location when viewed in map view.
I encourage you to join and vote to New expression to get address from latlon, or get latlon from address vice versa
Otherwise as Tony mentioned, use external service (actually now internal service? as Appsheet is part of Google) like Google App script and generate the custom function which can be used within Google Sheet. To convert Address field value to lat long is not complicated scripting. Here is sample code.
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 } } }
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |