Hello!
I am learning about Kinvey now and I would like to make a filter to get all records containing the movie theaters that are within a five mile radius of where I am located, for example.
I tried the following command line in the Console API:
/appdata/................/my-theaters?query.near("_geoloc", "-49.933333,-22.216667", 0);
But always returns all records ignoring the filter.
Could you tell me, please, if the error is in the filter or in my data structure below?
================
HTTP/1.1 200 SUCCESS
Fri Aug 07 2015 20:53:26 GMT-0300 (Hora oficial do Brasil)
[
{
"_id": "55c54????????5e84901f9b5",
"id_admin": 2,
"theater_type": 2,
"theater_name": "Briar Street Theatre",
"event": "The Sound of Music",
"theater_address": "Av Pedro de toledo, 22",
"country": "Brasil",
"city": "Bauru",
"_geoloc": [
-49.933333,
-22.216667
],
"_acl": {
"creator": "kid_????????Ex"
},
"_kmd": {
"lmt": "2015-08-07T23:42:06.835Z",
"ect": "2015-08-07T23:34:29.431Z"
}
"_id": "55c54????????0193f00f5f9",
"id_admin": "2",
"theater_name": "New Amsterdam Theatre",
"event": "Blue Man Group",
"country": "USA",
"city": "New York, NY",
-49.0750992,
-22.307512
"lmt": "2015-08-07T23:45:39.453Z",
"ect": "2015-08-07T23:43:24.856Z"
"_id": "55c542e5b????????907757a",
"theater_name": "Astor Place Theatre",
"event": "Hershey Felder as Irving Berlin",
"lmt": "2015-08-07T23:45:10.756Z",
"ect": "2015-08-07T23:44:37.653Z"
]
I would appreciate any help!
Marco
Marco Antonio Moema
Hello!
I am learning about Kinvey now and I would like to make a filter to get all records containing the movie theaters that are within a five mile radius of where I am located, for example.
I tried the following command line in the Console API:
/appdata/................/my-theaters?query.near("_geoloc", "-49.933333,-22.216667", 0);
But always returns all records ignoring the filter.
Could you tell me, please, if the error is in the filter or in my data structure below?
================
HTTP/1.1 200 SUCCESS
Fri Aug 07 2015 20:53:26 GMT-0300 (Hora oficial do Brasil)
[
{
"_id": "55c54????????5e84901f9b5",
"id_admin": 2,
"theater_type": 2,
"theater_name": "Briar Street Theatre",
"event": "The Sound of Music",
"theater_address": "Av Pedro de toledo, 22",
"country": "Brasil",
"city": "Bauru",
"_geoloc": [
-49.933333,
-22.216667
],
"_acl": {
"creator": "kid_????????Ex"
},
"_kmd": {
"lmt": "2015-08-07T23:42:06.835Z",
"ect": "2015-08-07T23:34:29.431Z"
}
},
{
"_id": "55c54????????0193f00f5f9",
"id_admin": "2",
"theater_type": 2,
"theater_name": "New Amsterdam Theatre",
"event": "Blue Man Group",
"theater_address": "Av Pedro de toledo, 22",
"country": "USA",
"city": "New York, NY",
"_geoloc": [
-49.0750992,
-22.307512
],
"_acl": {
"creator": "kid_????????Ex"
},
"_kmd": {
"lmt": "2015-08-07T23:45:39.453Z",
"ect": "2015-08-07T23:43:24.856Z"
}
},
{
"_id": "55c542e5b????????907757a",
"id_admin": "2",
"theater_type": 2,
"theater_name": "Astor Place Theatre",
"event": "Hershey Felder as Irving Berlin",
"theater_address": "Av Pedro de toledo, 22",
"country": "USA",
"city": "New York, NY",
"_geoloc": [
-49.933333,
-22.216667
],
"_acl": {
"creator": "kid_????????Ex"
},
"_kmd": {
"lmt": "2015-08-07T23:45:10.756Z",
"ect": "2015-08-07T23:44:37.653Z"
}
}
]
I would appreciate any help!
Marco