Hi there,
I am not able to access the geo_point
data object anymore. I don't know why, because it was possible before. Does anyone have the same problem?
According to Xano Geography Documentation a geo-point
data type is a JSON object like this:
{
"type": "point",
"data": {
"lng": a,
"lat": b
}
}
That's fine, because when my API geo_point
input receives this kind of data, Xano accepts it without problem. However, when I try to access the my input value what I get is not an object, it is a text/string
like this:
POINT(40.47280541012 3.8762147035297)
So all my logic that previously worked by accessing the geo_point
object, is not working anymore. I was able to apply the get
filter or even the dot notation to my geo_point
object to obtain the latitude and longitude, but I can't now. If I try to do something like my_location_input.data.lat
now, I get an error.
There are no geo filters or functions to retrieve the latitude and longitude from a geo_point
either, so the only way I can think of fixing, I hope temporarily, the problem is by extracting them from the text/string
above. I don't like to do this at all, but I need to use the Calculate Distance
function that doesn't take two geo_points
as arguments, instead it takes four decimals
(two latitudes and two longitudes).
Here is an example trying to get the data
object:
Here is the same example disabling the get
filter to see what the location
input is: