Type alias GeoCircle

GeoCircle: {
    center: GeoPoint;
    distance: number;
}

Represents a circle in spherical geometry that can be used as an argument for geospatial queries.

Type declaration

  • center: GeoPoint

    The center of the circle.

  • distance: number

    The radius of the circle in radians. You can use kmToRadians and miToRadians to respectively convert kilometers and miles to radians.

Example

let circle: GeoCircle = {
center: [20, 40],
distance: 0.05,
};
realm.objects(Restaurant).filtered("location geoWithin $0", circle)

Generated using TypeDoc