I'm trying to query my collection using geoSpatial query to return results near to a point, along with the distance from that point.
I'm using Queryable#near_sphere
with Mongoid http://mongoid.org/en/origin/docs/selection.html
This executes the $nearSphere command on the query.
I've seen the geoNear
command:
http://www.mongodb.org/display/DOCS/Geospatial+Indexing#GeospatialIndexing-geoNearCommand
This seems to return the results, with the calculated distance
Is there a way to either:
a) return the distance using nearSphere
b) use geoNear with Mongoid