1 // 2 // AIRUrlTileOverlay.h 3 // AirMaps 4 // 5 // Created by cascadian on 3/19/16. 6 // Copyright © 2016. All rights reserved. 7 // 8 9 #import <Foundation/Foundation.h> 10 #import <MapKit/MapKit.h> 11 #import <UIKit/UIKit.h> 12 13 #import <React/RCTComponent.h> 14 #import <React/RCTView.h> 15 #import "AIRMapCoordinate.h" 16 #import "AIRMap.h" 17 #import "RCTConvert+AirMap.h" 18 #import "AIRMapUrlTileCachedOverlay.h" 19 20 @interface AIRMapUrlTile : MKAnnotationView <MKOverlay> { 21 BOOL _urlTemplateSet; 22 BOOL _tileSizeSet; 23 BOOL _flipYSet; 24 BOOL _tileCachePathSet; 25 BOOL _tileCacheMaxAgeSet; 26 BOOL _maximumNativeZSet; 27 BOOL _cachedOverlayCreated; 28 BOOL _opacitySet; 29 } 30 31 @property (nonatomic, weak) AIRMap *map; 32 33 @property (nonatomic, strong) AIRMapUrlTileCachedOverlay *tileOverlay; 34 @property (nonatomic, strong) MKTileOverlayRenderer *renderer; 35 @property (nonatomic, copy) NSString *urlTemplate; 36 @property NSInteger maximumZ; 37 @property NSInteger maximumNativeZ; 38 @property NSInteger minimumZ; 39 @property BOOL flipY; 40 @property BOOL shouldReplaceMapContent; 41 @property NSInteger tileSize; 42 @property (nonatomic, copy) NSString *tileCachePath; 43 @property NSInteger tileCacheMaxAge; 44 @property BOOL offlineMode; 45 @property CGFloat opacity; 46 47 - (void)updateProperties; 48 - (void)update; 49 50 #pragma mark MKOverlay protocol 51 52 @property(nonatomic, readonly) CLLocationCoordinate2D coordinate; 53 @property(nonatomic, readonly) MKMapRect boundingMapRect; 54 //- (BOOL)intersectsMapRect:(MKMapRect)mapRect; 55 - (BOOL)canReplaceMapContent; 56 57 @end 58