GPKGBoundedOverlay
Objective-C
@interface GPKGBoundedOverlay : MKTileOverlay
Swift
class GPKGBoundedOverlay : MKTileOverlay
Abstract overlay which provides bounding returned tiles by zoom levels and/or a bounding box
-
Min zoom
Declaration
Objective-C
@property (nonatomic, strong) NSNumber *minZoom;Swift
var minZoom: NSNumber! { get set } -
Max zoom
Declaration
Objective-C
@property (nonatomic, strong) NSNumber *maxZoom;Swift
var maxZoom: NSNumber! { get set } -
Web mercator bounding box
Declaration
Objective-C
@property (nonatomic, strong) GPKGBoundingBox *webMercatorBoundingBox;Swift
var webMercatorBoundingBox: GPKGBoundingBox! { get set } -
Initialize
Declaration
Objective-C
- (instancetype)init;Swift
init!()Return Value
new bounded overlay
-
Close any overlay connections
Declaration
Objective-C
- (void)close;Swift
func close() -
Set the bounding box, provided as the indicated projection
Declaration
Objective-C
- (void)setBoundingBox:(GPKGBoundingBox *)boundingBox inProjection:(PROJProjection *)projection;Swift
func setBoundingBox(_ boundingBox: GPKGBoundingBox!, in projection: PROJProjection!)Parameters
boundingBoxbounding box
projectionprojection of bounding box
-
Get the bounding box as the provided projection
Declaration
Objective-C
- (GPKGBoundingBox *)boundingBoxInProjection:(PROJProjection *)projection;Swift
func boundingBox(in projection: PROJProjection!) -> GPKGBoundingBox!Parameters
projectionreturned bounding box projection
Return Value
bounding box
-
Determine if there is a tile for the x, y, and zoom
Declaration
Objective-C
- (BOOL)hasTileWithX:(NSInteger)x andY:(NSInteger)y andZoom:(NSInteger)zoom;Swift
func hasTileWith(x: Int, andY y: Int, andZoom zoom: Int) -> BoolParameters
xx coordinate
yy coordinate
zoomzoom value
Return Value
true if there is a tile
-
Check if there is a tile to retrieve without performing a tile is within bounds check
Declaration
Objective-C
- (BOOL)hasTileToRetrieveWithX:(NSInteger)x andY:(NSInteger)y andZoom:(NSInteger)zoom;Swift
func hasTileToRetrieveWith(x: Int, andY y: Int, andZoom zoom: Int) -> BoolParameters
xx coordinate
yy coordinate
zoomzoom value
Return Value
true if there is a tile
-
Retrieve the tile
Declaration
Objective-C
- (NSData *)retrieveTileWithX:(NSInteger)x andY:(NSInteger)y andZoom:(NSInteger)zoom;Swift
func retrieveTileWith(x: Int, andY y: Int, andZoom zoom: Int) -> Data!Parameters
xx coordinate
yy coordinate
zoomzoom value
Return Value
tile
-
Is the tile within the zoom and bounding box bounds
Declaration
Objective-C
- (BOOL)isWithinBoundsWithX:(NSInteger)x andY:(NSInteger)y andZoom:(NSInteger)zoom;Swift
func isWithinBoundsWith(x: Int, andY y: Int, andZoom zoom: Int) -> BoolParameters
xx coordinate
yy coordinate
zoomzoom value
Return Value
true if within the bounds
-
Check if the zoom is within the overlay zoom range
Declaration
Objective-C
- (BOOL)isWithinZoom:(double)zoom;Swift
func `is`(withinZoom zoom: Double) -> BoolParameters
zoomzoom value
Return Value
true if within the zoom bounds
-
Check if the tile request is within the desired tile bounds
Declaration
Objective-C
- (BOOL)isWithinBoundingBoxWithX:(NSInteger)x andY:(NSInteger)y andZoom:(NSInteger)zoom;Swift
func isWithinBoundingBoxWith(x: Int, andY y: Int, andZoom zoom: Int) -> BoolParameters
xx coordinate
yy coordinate
zoomzoom value
Return Value
true if within the bounding box bounds
View on GitHub
GPKGBoundedOverlay Class Reference