GeoNear constructor
GeoNear({})
Implementation
GeoNear(
{required Geometry near,
required String distanceField,
num? maxDistance,
num? minDistance,
bool? spherical,
dynamic query,
num? distanceMultiplier,
String? includeLocs,
String? key})
: assert(near.type == GeometryObjectType.Point,
'\$geoNear \'near\' field must be Point'),
super(
'geoNear',
AEObject({
'near': near.build()[r'$geometry'],
'distanceField': distanceField,
if (maxDistance != null) 'maxDistance': maxDistance,
if (minDistance != null) 'minDistance': minDistance,
if (spherical != null) 'spherical': spherical,
if (query != null) 'query': _getQuery(query),
if (distanceMultiplier != distanceMultiplier)
'distanceMultiplier': distanceMultiplier,
if (includeLocs != null) 'includeLocs': includeLocs,
if (key != null) 'key': key
}));