geoNear method

dynamic geoNear(
  1. Point? geometry, {
  2. num? maxDistance,
  3. num? minDistance,
})

Implementation

geoNear(Point? geometry, {num? maxDistance, num? minDistance}) {
  if (geometry == null) {
    throw CloudBaseException(
      code: CloudBaseExceptionCode.INVALID_PARAM,
      message: '"geometry" can not be null.',
    );
  }

  var params = {};
  params['geometry'] = geometry;

  if (maxDistance != null) {
    params['maxDistance'] = maxDistance;
  }
  if (minDistance != null) {
    params['minDistance'] = minDistance;
  }

  return this._queryOP(QueryCommandsLiteral.GEO_NEAR, params);
}