Method GeoNear
GeoNear(GeoNearArgs)
Runs a GeoNear command on this collection.
public virtual GeoNearResult<TDefaultDocument> GeoNear(GeoNearArgs args)
Parameters
argsGeoNearArgsThe args.
Returns
- GeoNearResult<TDefaultDocument>
GeoNear(IMongoQuery, double, double, int)
Runs a GeoNear command on this collection.
[Obsolete("Use the overload of GeoNear that takes a GeoNearArgs parameter instead.")]
public virtual GeoNearResult<TDefaultDocument> GeoNear(IMongoQuery query, double x, double y, int limit)
Parameters
queryIMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
xdoubleThe x coordinate of the starting location.
ydoubleThe y coordinate of the starting location.
limitintThe maximum number of results returned.
Returns
- GeoNearResult<TDefaultDocument>
GeoNear(IMongoQuery, double, double, int, IMongoGeoNearOptions)
Runs a GeoNear command on this collection.
[Obsolete("Use the overload of GeoNear that takes a GeoNearArgs parameter instead.")]
public virtual GeoNearResult<TDefaultDocument> GeoNear(IMongoQuery query, double x, double y, int limit, IMongoGeoNearOptions options)
Parameters
queryIMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
xdoubleThe x coordinate of the starting location.
ydoubleThe y coordinate of the starting location.
limitintThe maximum number of results returned.
optionsIMongoGeoNearOptionsOptions for the GeoNear command (see GeoNearOptionsDocument, GeoNearOptionsWrapper, and the GeoNearOptions builder).
Returns
- GeoNearResult<TDefaultDocument>