Click or drag to resize

DataSourceApiQueryNearSphere Method

Create a geospatial query for finding documents near a specific geographic location, emphasizing spherical calculations.

Namespace: Casewhere.Runtime.DSL.Api
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.5.0
Syntax
C#
public DataSourceApiQuery NearSphere(
	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

DataSourceApiQuery
The query object itself for chaining purpose.
See Also