nearSphere method

SelectorBuilder nearSphere(
  1. String fieldName,
  2. Geometry point, {
  3. double? maxDistance,
  4. double? minDistance,
})

Only support geometry of point

Implementation

SelectorBuilder nearSphere(String fieldName, Geometry point,
    {double? maxDistance, double? minDistance}) {
  _addExpression(fieldName, {
    '\$nearSphere': <String, dynamic>{
      if (minDistance != null) '\$minDistance': minDistance,
      if (maxDistance != null) '\$maxDistance': maxDistance
    }..addAll(point.build()),
  });
  return this;
}