Create a table names ‘Post’ and add a Non-nullable POINT type column ‘location’
Add a data with a value for the column location POINT (35.7847337 129.4718646).
In the ‘REST Console’ tab, click ‘GET’ button with following where clause ‘distance(35.7723197,129.4849648,location.latitude,location.longitude) < km(2)’
get the only data in Post table.
Actual Behavior
1.~3. same
4. Get JSON Object
{
“code”: 1054,
“message”: “Column ‘latitude’ does not exist in table ‘Post’”
}
Thank you for the answer but it returns following JSON Object
{
“code”: 1210,
“message”: “Incorrect arguments to st_distance_sphere”
}
Could you help me about this more?
You have incorrect data. Longitude should be entered first and then Latitude.
Your object should be: POINT (129.4718646 35.7847337) which as I see is in a South Korea.
Ger request should be like: distanceOnSphere('POINT(129.4718646 35.7847337)', location) < km(2)
I recommend going through Backendless Missions to get the knowledge of Backendless APIs and database functionality first. Have you looked into it yet?
normally result is ok when we do search by below query with distance 4000 M
distanceOnSphere(FATGPS, ‘POINT(96.11611 21.97283)’) <= 4000
But now we are receiving this error if distance is 300 M
distanceOnSphere(FATGPS, ‘POINT(96.11611 21.97283)’) <= 300
Yes. My App ID is 96A33344-0C65-AC14-FF0D-C71CD4DDCA00
I have two data table called FATDB and FATDBMDY
Issue is only happened in FATDBMDY .Kindly check.
Thanks