Type alias GeoBox

GeoBox: {
    bottomLeft: GeoPoint;
    topRight: GeoPoint;
}

Represents a box in spherical geometry that can be used as an argument for geospatial queries. This is a short-hand for the equivalent GeoPolygon.

Type declaration

  • bottomLeft: GeoPoint

    The bottom left point of the box.

  • topRight: GeoPoint

    The top right point of the box.

Example

let box: GeoBox = {
bottomLeft: [-1, -1],
topRight: [1, 1],
};
realm.objects(Restaurant).filtered("location geoWithin $0", box)

Generated using TypeDoc