whereWithinDistance method

DatumQueryBuilder<T> whereWithinDistance(
  1. String field,
  2. Map<String, double> center,
  3. double radiusInMeters
)

Adds a geographical distance filter.

center should be a map with 'latitude' and 'longitude' keys. radiusInMeters is the maximum distance from the center.

Implementation

DatumQueryBuilder<T> whereWithinDistance(
  String field,
  Map<String, double> center,
  double radiusInMeters,
) {
  _filters.add(
    Filter(field, FilterOperator.withinDistance, {
      'center': center,
      'radius': radiusInMeters,
    }),
  );
  return this;
}