I have a collection 'place' ,one documentis as below
{
"_id" : ObjectId("52401a7267778834a23a54a2"),
"userid" : "123",
"loc" : {
"lng" : 77.6166685,
"lat" : 12.9361732
},
"t" : ISODate("2013-04-23T10:39:46.540Z")
}
I want to find out locations of user with userid 234 and loc near to [77.6166685,12.9361732] within 1km
but the below query is not working
db.place.find({{"userid":"234","loc":{"$near":{"$geometry":{"type":"point","coordinates":[77.6166685,12.9361732]},"$maxDistance":1000}}})
it showing error as given below
error: {
"$err" : "point not in interval of [ -180, 180 ] :: caused by :: { 0: 0.0, 1: 250.0 }",
"code" : 16433
}
what is this error and how can I correct it?