Geocoding an address... how to save the latitude and longitude points?
I'm using Geocode.io for an external API to take a user's input (address) and convert it into geocoded latitude and longitude points, but I am having trouble saving the coordinates in the database as a geo_point.
Can anyone help me understand how I can accomplish this?
I have successfully converted the address into latitude and longitude points, but when I go to edit the record, the database returns an error.
code: ERROR_CODE_INPUT_ERROR,
message: Missing param: field_value,
param: field_value
Answers
-
Most likely the field value isn't getting filled into your edit record. You need to set the field name (probably "ID") and then the field value (the ID of the record you want to change, e.g users_1.id) and then you can choose which change you want to make to the table, such as your geopoint.
-
After looking back at it and changing some of the parameters, it's passing the correct user through. The problem is that, when I go to save the latitude and longitude that I receive back from my API request, it's not saving it as a geo point. It just tells me an "unknown error has occured."
I don't know what I'm doing wrong.
When setting the geo point field with the new returned value, it's not saving the latitude and longitude correctly.
-
You might get more help by sharing screenshots of your setup and the error - the problem with paragraph text is that its imprecise, and fixing this is going to be a matter of precision.
Xano has free office hours on Tuesdays for these "easier to show than tell" problems, and State Change (my group) has daily office hours for the hard end of no-code problems. Our next one is today at 1pm EDT / 1700 GMT.
-
Hey @justin_88 we use the geo fields extensively in our Xano backend. I have created a function that takes lat and long values and creates a geopoint so that I can then pass the result to any variables in endpoints or other functions. One thing that I have found that can sometime mess this up is if the precision of the lat/long is greater than say 10 decimal points. Really up to 6 decimal points is accuarate within cm's. Happy to help if you can't make it work based on the screenshots.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback