SPBoundingBox
Objective-C
@interface SPBoundingBox : NSObject
Swift
class SPBoundingBox : NSObject
Bounding box between two coordinates.
-
Creates a new instance of SPBoundingBox
Declaration
Objective-C
+ (nonnull instancetype)boundingBoxWith:(double)latitude longitude:(double)longitude radius:(double)radius;Swift
class func boundingBoxWith(latitude: Double, longitude: Double, radius: Double) -> SelfParameters
latitudeGPS coordinate
longitudeGPS coordinate
radiusbounding box radius in meters
Return Value
new instance of SPBoundingBox
-
Creates a new instance of SPBoundingBox
Declaration
Objective-C
+ (nonnull instancetype)boundingBoxWith:(CLLocationCoordinate2D)southWest northEast:(CLLocationCoordinate2D)northEast;Swift
class func boundingBoxWith(southWest: CLLocationCoordinate2D, northEast: CLLocationCoordinate2D) -> SelfParameters
southWestcoordinate
northEastcoordinate
Return Value
new instance of SPBoundingBox
-
Creates a new instance of SPBoundingBox. Bounding box takes into account only parts of the route that are on a certain floor
Declaration
Objective-C
+ (nonnull instancetype)boundingBoxWithRoute:(nonnull SPRoute *)route floor:(nullable NSNumber *)floor;Swift
convenience init(route: SPRoute, floor: NSNumber?)Parameters
routethe route that should be contained within the bounding box
floorthe index of the floor
Return Value
new instance of SPBoundingBox
-
Declaration
Objective-C
- (BOOL)isValidBoundingBox;Swift
func isValidBoundingBox() -> BoolReturn Value
true if bounding box is considered valid
-
Corresponds to south west GPS coordinate of the bounding box.
Declaration
Objective-C
- (CLLocationCoordinate2D)southWest;Swift
func southWest() -> CLLocationCoordinate2D -
Corresponds to north east GPS coordinate of the bounding box.
Declaration
Objective-C
- (CLLocationCoordinate2D)northEast;Swift
func northEast() -> CLLocationCoordinate2D
SPBoundingBox Class Reference