FilterDefinitionBuilderTDocumentNearSphereTCoordinates Method (ExpressionFuncTDocument, Object, GeoJsonPointTCoordinates, NullableDouble, NullableDouble) |
Creates a near sphere filter.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.17.0+b316340e6cc3a8bfc8638dc31b54fbbfe41bfcb2
Syntax public FilterDefinition<TDocument> NearSphere<TCoordinates>(
Expression<Func<TDocument, Object>> field,
GeoJsonPoint<TCoordinates> point,
double? maxDistance = null,
double? minDistance = null
)
where TCoordinates : GeoJsonCoordinates
Public Function NearSphere(Of TCoordinates As GeoJsonCoordinates) (
field As Expression(Of Func(Of TDocument, Object)),
point As GeoJsonPoint(Of TCoordinates),
Optional maxDistance As Double? = Nothing,
Optional minDistance As Double? = Nothing
) As FilterDefinition(Of TDocument)
member NearSphere :
field : Expression<Func<'TDocument, Object>> *
point : GeoJsonPoint<'TCoordinates> *
?maxDistance : Nullable<float> *
?minDistance : Nullable<float>
(* Defaults:
let _maxDistance = defaultArg maxDistance null
let _minDistance = defaultArg minDistance null
*)
-> FilterDefinition<'TDocument> when 'TCoordinates : GeoJsonCoordinates
Parameters
- field
- Type: System.Linq.ExpressionsExpressionFuncTDocument, Object
The field. - point
- Type: MongoDB.Driver.GeoJsonObjectModelGeoJsonPointTCoordinates
The geometry. - maxDistance (Optional)
- Type: SystemNullableDouble
The maximum distance. - minDistance (Optional)
- Type: SystemNullableDouble
The minimum distance.
Type Parameters
- TCoordinates
- The type of the coordinates.
Return Value
Type:
FilterDefinitionTDocumentA near sphere filter.
See Also