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) -> Self
Parameters
latitude
GPS coordinate
longitude
GPS coordinate
radius
bounding 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) -> Self
Parameters
southWest
coordinate
northEast
coordinate
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
route
the route that should be contained within the bounding box
floor
the index of the floor
Return Value
new instance of SPBoundingBox
-
Declaration
Objective-C
- (BOOL)isValidBoundingBox;
Swift
func isValidBoundingBox() -> Bool
Return 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