RLMGeospatialBox
Objective-C
@interface RLMGeospatialBox : NSObject <RLMGeospatial>
Swift
class RLMGeospatialBox : NSObject, RLMGeospatial, @unchecked Sendable
表示矩形的类,可用于地理空间geoWithin
查询。
警告
此类无法持久保存,只能在地理空间geoWithin
查询中使用。
-
矩形的左下角。
声明
Objective-C
@property (strong, readonly) RLMGeospatialPoint *_Nonnull bottomLeft;
Swift
var bottomLeft: RLMGeospatialPoint { get }
-
矩形的右上角。
声明
Objective-C
@property (strong, readonly) RLMGeospatialPoint *_Nonnull topRight;
Swift
var topRight: RLMGeospatialPoint { get }
-
使用左下角和右上角的值初始化
RLMGeospatialBox
。声明
Objective-C
- (nonnull instancetype) initWithBottomLeft:(nonnull RLMGeospatialPoint *)bottomLeft topRight:(nonnull RLMGeospatialPoint *)topRight;
Swift
init(bottomLeft: RLMGeospatialPoint, topRight: RLMGeospatialPoint)
参数
bottomLeft
矩形的左下角。
topRight
矩形的右上角。