DataObjectApiQueryNear Method
|
Create a geospatial queries that find documents near a specific location, taking distance constraints into account.
Namespace: Casewhere.Runtime.DSL.ApiAssembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.5.0
Syntaxpublic DataObjectApiQuery Near(
string field,
double x,
double y,
double? maxDistance = 0,
double? minDistance = 0
)
Parameters
- field String
- This parameter specifies the name of the field in your documents that contains location data or coordinates.
- x Double
- The parameter represent the longitude.
- y Double
- The parameter represent the latitude.
- maxDistance NullableDouble (Optional)
- This parameter specifies the maximum distance within which to find documents. It defaults to 0 if not provided.
- minDistance NullableDouble (Optional)
- This parameter specifies the minimum distance from the target location. It defaults to 0 if not provided.
Return Value
DataObjectApiQueryThe query object itself for chaining purpose.
See Also