MBMCoordinateBounds
@interface MBMCoordinateBounds : NSObject
A rectangular area as measured on a two-dimensional map projection.
-
Unavailable
Undocumented
Declaration
Objective-C
- (nonnull instancetype)init NS_UNAVAILABLE; -
Unavailable
Undocumented
Declaration
Objective-C
+ (nonnull instancetype)new NS_UNAVAILABLE; -
Undocumented
Declaration
Objective-C
- (nonnull instancetype)initWithSouthwest:(CLLocationCoordinate2D)southwest northeast:(CLLocationCoordinate2D)northeast;Swift
init(southwest: CLLocationCoordinate2D, northeast: CLLocationCoordinate2D) -
Undocumented
Declaration
Objective-C
- (nonnull instancetype)initWithSouthwest:(CLLocationCoordinate2D)southwest northeast:(CLLocationCoordinate2D)northeast infiniteBounds:(BOOL)infiniteBounds;Swift
init(southwest: CLLocationCoordinate2D, northeast: CLLocationCoordinate2D, infiniteBounds: Bool) -
Returns a bounds covering the entire (unwrapped) world.
Declaration
Objective-C
+ (nonnull MBMCoordinateBounds *)world;Return Value
The newly constructed record.
-
Returns the bounds consisting of the single point.
Declaration
Objective-C
+ (nonnull MBMCoordinateBounds *)singletonForPoint: (CLLocationCoordinate2D)point;Parameters
pointThe coordinate of all corners of the bounds.
Return Value
The newly constructed singleton bounds record.
-
Returns the convex hull of two points; the smallest bounds that contains both.
Declaration
Objective-C
+ (nonnull MBMCoordinateBounds *)hullForA:(CLLocationCoordinate2D)a b:(CLLocationCoordinate2D)b;Parameters
aThe first of the two coordinates to fit.
bThe second of the two coordinates to fit.
Return Value
The newly constructed record.
-
Returns the southern latitude of the bounds.
Declaration
Objective-C
- (double)south;Return Value
The southern latitude of the bounds.
-
Returns the western longitude of the bounds.
Declaration
Objective-C
- (double)west;Return Value
The western longitude of the bounds.
-
Returns the northern latitude of the bounds.
Declaration
Objective-C
- (double)north;Return Value
The northern latitude of the bounds.
-
Returns the eastern longitude of the bounds.
Declaration
Objective-C
- (double)east;Return Value
The eastern longitude of the bounds.
-
Returns the southeast coordinate of the bounds.
Declaration
Objective-C
- (CLLocationCoordinate2D)southeast;Return Value
The southeast coordinate of the bounds.
-
Returns the northwest coordinate of the bounds.
Declaration
Objective-C
- (CLLocationCoordinate2D)northwest;Return Value
The northwest coordinate of the bounds.
-
Returns the center coordinate of the bounds.
Declaration
Objective-C
- (CLLocationCoordinate2D)center;Return Value
The center coordinate of the bounds.
-
Constrains
pointagainst the bounds.Declaration
Objective-C
- (CLLocationCoordinate2D)constrainForPoint:(CLLocationCoordinate2D)point;Swift
func constrain(forPoint point: CLLocationCoordinate2D) -> CLLocationCoordinate2DParameters
pointThe coordinate to be constrained.
-
Returns whether the bounds are empty or not.
Declaration
Objective-C
- (BOOL)isEmpty;Return Value
trueif the bounds are empty,falseotherwise. -
Returns whether the bounds are infinite or bounded.
Declaration
Objective-C
- (BOOL)isBounded;Return Value
trueif the bounds are not infinite,falseotherwise. -
Returns whether the bounds cross the date line or not.
Declaration
Objective-C
- (BOOL)crossesAntimeridian;Return Value
trueif the bounds cross the antimeridian,falseotherwise. -
Returns whether the bounds contains
pointor not.Declaration
Objective-C
- (BOOL)containsForPoint:(CLLocationCoordinate2D)point wrappedCoordinates:(BOOL)wrappedCoordinates;Swift
func contains(forPoint point: CLLocationCoordinate2D, wrappedCoordinates: Bool) -> BoolParameters
pointThe coordinate to be checked against the bounds.
wrappedCoordinatesWhether to wrap the coordinate or not.
Return Value
trueif the bounds containspoint,falseotherwise. -
Returns whether the bounds contains
areaor not.Declaration
Objective-C
- (BOOL)containsForArea:(nonnull MBMCoordinateBounds *)area wrappedCoordinates:(BOOL)wrappedCoordinates;Swift
func contains(forArea area: CoordinateBounds, wrappedCoordinates: Bool) -> BoolParameters
areaThe area to be checked against the bounds.
wrappedCoordinatesWhether to wrap the coordinate or not.
Return Value
trueif the bounds containsarea,falseotherwise. -
Returns whether the bounds contains
latitudeor not.Declaration
Objective-C
- (BOOL)containsLatitudeForLatitude:(double)latitude;Swift
func containsLatitude(forLatitude latitude: Double) -> BoolParameters
latitudeThe latitude to be checked against the bounds.
Return Value
trueif the bounds containslatitude,falseotherwise. -
Returns whether the bounds contains
longitudeor not.Declaration
Objective-C
- (BOOL)containsLongitudeForLongitude:(double)longitude;Swift
func containsLongitude(forLongitude longitude: Double) -> BoolParameters
longitudeThe longitude to be checked against the bounds.
Return Value
trueif the bounds containslongitude,falseotherwise. -
Returns the absolute distance, in degrees, between the north and south boundaries of these bounds.
Declaration
Objective-C
- (double)latitudeSpan;Return Value
Span distance
-
Returns the absolute distance, in degrees, between the west and east boundaries of these bounds.
Declaration
Objective-C
- (double)longitudeSpan;Return Value
Span distance
-
Returns whether the bounds intersects
areaor not.Declaration
Objective-C
- (BOOL)intersectsForArea:(nonnull MBMCoordinateBounds *)area wrappedCoordinates:(BOOL)wrappedCoordinates;Swift
func intersects(forArea area: CoordinateBounds, wrappedCoordinates: Bool) -> BoolParameters
areaThe area to be checked against the bounds.
wrappedCoordinatesWhether to wrap the coordinate or not.
Return Value
trueif the bounds intersectsarea,falseotherwise. -
Extends these bounds to include
point.Declaration
Objective-C
- (nonnull MBMCoordinateBounds *)extendForPoint:(CLLocationCoordinate2D)point;Swift
func extend(forPoint point: CLLocationCoordinate2D) -> CoordinateBoundsParameters
pointThe coordinate to be included.
Return Value
The extended bounds.
-
Extends these bounds to include
area.Declaration
Objective-C
- (nonnull MBMCoordinateBounds *)extendForArea: (nonnull MBMCoordinateBounds *)area;Swift
func extend(forArea area: CoordinateBounds) -> CoordinateBoundsParameters
areaThe bounds to be included.
Return Value
The extended bounds.
-
Coordinate at the southwest corner. Note: setting this field with invalid values (infinite, NaN) will crash the application.
Declaration
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D southwest;Swift
var southwest: CLLocationCoordinate2D { get } -
Coordinate at the northeast corner. Note: setting this field with invalid values (infinite, NaN) will crash the application.
Declaration
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D northeast;Swift
var northeast: CLLocationCoordinate2D { get } -
If set to
true, an infinite (unconstrained) bounds covering the world coordinates would be used. Coordinates provided insouthwestandnortheastfields would be omitted and have no effect.Declaration
Objective-C
@property (nonatomic, readonly, getter=isInfiniteBounds) BOOL infiniteBounds;Swift
var isInfiniteBounds: Bool { get }
MBMCoordinateBounds Class Reference