TKMapRegion
@interface TKMapRegion : NSObject
Object entity carrying information about a coordinate region.
This is a simple object whose main purpose is to wrap up the MKCoordinateRegion
structure.
-
MapKit-compatible coordinate region structure.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) MKCoordinateRegion coordinateRegion;
Swift
var coordinateRegion: MKCoordinateRegion { get set }
-
Center location object.
Declaration
Objective-C
@property (readonly, atomic) CLLocation *_Nonnull centerPoint;
Swift
var centerPoint: CLLocation { get }
-
South-west location object.
Declaration
Objective-C
@property (readonly, atomic) CLLocation *_Nonnull southWestPoint;
Swift
var southWestPoint: CLLocation { get }
-
North-east location object.
Declaration
Objective-C
@property (readonly, atomic) CLLocation *_Nonnull northEastPoint;
Swift
var northEastPoint: CLLocation { get }
-
States information about the region validity.
Declaration
Objective-C
@property (readonly, atomic) BOOL hasValidCoordinate;
Swift
var hasValidCoordinate: Bool { get }
-
Initializes the map region object using
MKCoordinateRegion
.Declaration
Objective-C
- (nonnull instancetype)initWithCoordinateRegion:(MKCoordinateRegion)region;
Swift
init(coordinateRegion region: MKCoordinateRegion)
Parameters
region
MapKit-compatible coordinate region to use.
Return Value
Objectified map region.
-
Initializes the map region object using a couple of bounding
CLLocation
points.Declaration
Objective-C
- (nonnull instancetype)initWithSouthWestPoint:(nonnull CLLocation *)southWest northEastPoint:(nonnull CLLocation *)northEast;
Swift
init(southWestPoint southWest: CLLocation, northEastPoint northEast: CLLocation)
Parameters
southWest
South-west bounding
CLLocation
point.northEast
North-east bounding
CLLocation
point.Return Value
Objectified map region.
-
States whether the given location lies inside the map region.
Declaration
Objective-C
- (BOOL)containsLocation:(nonnull CLLocation *)location;
Swift
func contains(_ location: CLLocation) -> Bool
Parameters
location
CLLocation
point to check.Return Value
Boolean value indicating whether the given location lies inside the map region.