SKBoundingBox Class Reference

Inherits from NSObject
Declared in SKBoundingBox.h

Overview

The SKBoundingBox is used to define a bounding box on map between a bottom right and top left coordinates.

  topLeftCoordinate

The top left coordinate of the bounding box.

@property (nonatomic, assign) CLLocationCoordinate2D topLeftCoordinate

Discussion

The top left coordinate of the bounding box.

Declared In

SKBoundingBox.h

  bottomRightCoordinate

The bottom right coordinate of the bounding box.

@property (nonatomic, assign) CLLocationCoordinate2D bottomRightCoordinate

Discussion

The bottom right coordinate of the bounding box.

Declared In

SKBoundingBox.h

– containsCoordinate:

Verifies if a given location is within a bounding box.

- (BOOL)containsCoordinate:(CLLocationCoordinate2D)coordinate

Parameters

coordinate

The coordinate.

Return Value

The result of the verification(YES if the location is within the bounding box, No otherwise).

Discussion

Verifies if a given location is within a bounding box.

Declared In

SKBoundingBox.h

– boundingBoxIncludingCoordinate:

Returns a newly created bounding box with the given location inside the receiver bounding box.

- (SKBoundingBox *)boundingBoxIncludingCoordinate:(CLLocationCoordinate2D)coordinate

Parameters

coordinate

The coordinate.

Return Value

The newly created bounding box object. If the location is already inside the bounding box then the receiver bounding box will be returned.

Discussion

Returns a newly created bounding box with the given location inside the receiver bounding box.

Declared In

SKBoundingBox.h

+ boundingBoxWithTopLeftCoordinate:bottomRightCoordinate:

Creates a newly initialized SKBoundingBox.

+ (instancetype)boundingBoxWithTopLeftCoordinate:(CLLocationCoordinate2D)topLeft bottomRightCoordinate:(CLLocationCoordinate2D)bottomRight

Parameters

topLeft

The top left coordinate for the bounding box.

bottomRight

The bottom right coordinate for the bounding box.

Discussion

Creates a newly initialized SKBoundingBox.

Declared In

SKBoundingBox.h

+ boundingBoxForRegion:inMapViewWithSize:

Creates a newly initialized SKBoundingBox.

+ (instancetype)boundingBoxForRegion:(SKCoordinateRegion)region inMapViewWithSize:(CGSize)size

Parameters

region

The map region to be converted.

size

The size of the SKMapView’s frame.

Discussion

Creates a newly initialized SKBoundingBox.

Declared In

SKBoundingBox.h