I am getting wrong distance using mongodb geonear query. What I have done till now.
Saved the lat-long as
"Coordinates" : { "Longitude" : 174.811937, "Latitude" : -36.880177 }
Created 2d Index on Coordinates field of collection
- distance returned is
"distance": 253.33004896638525
I also tried 2dsphere index but result is same. Please let me know if anything that i am missing
db.collection('RestaurentMaster').aggregate([{
$geoNear : {
near : [174.780599, -36.855702],
distanceMultiplier : 6371,
distanceField : "distance",
spherical : false,
limit : 10,
query : {...}
}
}])