Yes I created a new column "CustomerGeoPoint1" of type Geopoint, in order no to mess any of my work done so far.
I went service to test and I put in where the value:
==================
{"$or": [{"Type":"Food"}] } AND {"CustomerGeoPoint1": {"$nearSphere": [23.791376,38002788], "$maxDistanceInMiles": 1}}
==================
The results are (with no errors that I can see), the below.
The problem is that the first record should not appear, as is more than 1 mile away from my (test) location [23.791376,38002788]
Correct ?....
(I want to return only the geopoints that are INSIDE a cycle with radious 1 mile.)
==================
[
{
"id":"544a1ccbe4b0c9bce12428fa",
"Type":"Food",
"createdAt":"2014-10-24 09:32:59.759",
"updatedAt":"2014-11-03 20:44:08.766",
"Description":"Full meal, one soft drink and one desert per person",
"ValidTo":"2014-10-24 00:13:00.000",
"ValidFrom":"2014-10-24 12:00:00.000",
"CustomerName":"Lucas Food",
"CustomerAddress":"Leoforos Vouliagmenis 234 17343 Athens Greece",
"CustomerGeoPoint":"37.947702, 23.738691",
"CustomerGeoPoint1":[
23.738691,
37.947702
]
},
{
"id":"545783b0e4b03d005b6291e6",
"Type":"Food",
"createdAt":"2014-11-03 13:31:28.957",
"updatedAt":"2014-11-03 20:43:31.656",
"Description":"Coffee and cheese pie for 1.50 euro",
"ValidFrom":"2014-11-03 00:00:00.000",
"ValidTo":"2014-11-03 00:00:00.000",
"CustomerName":"Everest",
"CustomerAddress":"Λεωφόρος Μεσογείων 273-275",
"CustomerGeoPoint":"38.004065, 23.793436",
"CustomerGeoPoint1":[
23.793436,
38.004065
]
}
]