whereWithinGeoBox method

void whereWithinGeoBox(
  1. String column,
  2. ParseGeoPoint southwest,
  3. ParseGeoPoint northeast
)

Returns an object with key point values contained within a given rectangular geographic bounding box.

Implementation

void whereWithinGeoBox(
    String column, ParseGeoPoint southwest, ParseGeoPoint northeast) {
  final double latitudeS = southwest.latitude;
  final double longitudeS = southwest.longitude;

  final double latitudeN = northeast.latitude;
  final double longitudeN = northeast.longitude;

  queries.add(MapEntry<String, dynamic>(_singleQuery,
      '"$column":{"\$within":{"\$box": [{"__type": "GeoPoint","latitude":$latitudeS,"longitude":$longitudeS},{"__type": "GeoPoint","latitude":$latitudeN,"longitude":$longitudeN}]}}'));
}