Access data within POINT
Options
![Erin Wagner](https://us.v-cdn.net/6037124/user_avatars/1255328.jpg)
Erin Wagner
Member ✭
I'm using the Google Distance Matrix to find out the driving distance between two points in my database records.
To do that, I need to format the latitudes and longitudes in a particular way within the query.
But I can't seem to easy access the lat or lng within a property with the point data type. The property is called point, so I've tried point.data.lat (because that's how it's formatted when I enter it and look at it on a table), but it throws an error.
So how do I get just the lat or just the lng out of a point data type property?
The data in a table:
[image.png]
How I'm inputting it into the function:
[image.png]
How that data is presented if I have the function simply return the input:
[image.png]
To do that, I need to format the latitudes and longitudes in a particular way within the query.
But I can't seem to easy access the lat or lng within a property with the point data type. The property is called point, so I've tried point.data.lat (because that's how it's formatted when I enter it and look at it on a table), but it throws an error.
So how do I get just the lat or just the lng out of a point data type property?
The data in a table:
[image.png]
How I'm inputting it into the function:
[image.png]
How that data is presented if I have the function simply return the input:
[image.png]
Comments
-
did you ever find a solution? I'm wondering the same thing.
-
I need to round my points to ≤ 7 decimal points. Referencing data from my front end, and haven't been able to find this either. commenting in hopes to bump this.
-
Thanks for your patience. I'm way behind on messages and just now getting to this.
I have had to put my project on hold temporarily and it has been about 5 months since I last looked at it, but if I remember correctly, I didn't get this particular feature resolved.
Any thoughts on how to get access the lat & long as individual data points? -
I ended up chatting with support about this issue.
Me> I'd like to be able to extract the latitude and longitude from a function/api input type of geo_point.
Support> Hi that isn't currently supported straight from the geo_point because it's entered in as a string. You could add it the database first then extract the lat and lng with dot notation or consider a different input method.
Certainly not an ideal answer. It seems like the geo point data type isn't really as fleshed out as I thought it would be.
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