AWFCoordinateBounds
Objective-C
@interface AWFCoordinateBounds : NSObject
Swift
class AWFCoordinateBounds : NSObject
An AWFCoordinateBounds
object describes a map coordinate region defined by a bounding rectangle.
-
The northern latitude value of the bounding box.
Declaration
Objective-C
@property (nonatomic) CGFloat north;
Swift
var north: CGFloat { get set }
-
The southern latitude value of the bounding box.
Declaration
Objective-C
@property (nonatomic) CGFloat south;
Swift
var south: CGFloat { get set }
-
The western longitude value of the bounding box.
Declaration
Objective-C
@property (nonatomic) CGFloat west;
Swift
var west: CGFloat { get set }
-
The eastern longitude value of the bounding box.
Declaration
Objective-C
@property (nonatomic) CGFloat east;
Swift
var east: CGFloat { get set }
-
The top-left map coordinate of the bounding box.
Declaration
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D northwest;
Swift
var northwest: CLLocationCoordinate2D { get }
-
The bottom-left map coordinate of the bounding box;
Declaration
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D southwest;
Swift
var southwest: CLLocationCoordinate2D { get }
-
The top-right map coordinate of the bounding box.
Declaration
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D northeast;
Swift
var northeast: CLLocationCoordinate2D { get }
-
The bottom-right map coordinate of the bounding box.
Declaration
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D southeast;
Swift
var southeast: CLLocationCoordinate2D { get }
-
The center coordinate of the bounding box.
Declaration
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D center;
Swift
var center: CLLocationCoordinate2D { get }
-
A convenience method that returns an instantiated instance of
AWFCoordinateBounds
with empty coordinate bounds.Declaration
Objective-C
+ (nonnull instancetype)coordinateBounds;
-
Returns a newly initialized coordinate bounds instance for the specified
northwest
andsoutheast
coordinate bounds.Declaration
Objective-C
+ (nonnull instancetype) coordinateBoundsWithNorthwest:(CLLocationCoordinate2D)northwest southeast:(CLLocationCoordinate2D)southeast;
Parameters
northwest
The northwest coordinate defining the top-left corner of the region.
southeast
The southeast coordinate defining the bottom-right corner of the region.
Return Value
An
AWFCoordinateBounds
object initialized with the specified bounding coordinates -
Returns a newly initialized coordinate bounds instance for the specified
northwest
andsoutheast
coordinate bounds.Declaration
Objective-C
- (nonnull instancetype)initWithNorthwest:(CLLocationCoordinate2D)northwest southeast:(CLLocationCoordinate2D)southeast;
Swift
init(northwest: CLLocationCoordinate2D, southeast: CLLocationCoordinate2D)
Parameters
northwest
The northwest coordinate defining the top-left corner of the region.
southeast
The southeast coordinate defining the bottom-right corner of the region.
Return Value
An
AWFCoordinateBounds
object initialized with the specified bounding coordinates -
Returns the coordinate bounds as a string, which is typically used when performing API requests for the region.
The returned string will be in the format
northwest.latitude,northwest.longitude,southeast.latitude,southeast.longitude
.Declaration
Objective-C
- (nonnull NSString *)boundsAsString;
Swift
func boundsAsString() -> String
Return Value
The coordinate bounds as a string.
-
Returns whether the coordinate bounds intersects the specified bounds.
Declaration
Objective-C
- (BOOL)intersects:(nonnull AWFCoordinateBounds *)bounds;
Swift
func intersects(_ bounds: AWFCoordinateBounds) -> Bool
-
Extends the coordinate bounds by the specified bounds.
Declaration
Objective-C
- (void)extend:(nonnull AWFCoordinateBounds *)bounds;
Swift
func extend(_ bounds: AWFCoordinateBounds)
Parameters
bounds
The bounds to use for extending the current coordinate bounds.