GLMapRasterTileSource


@interface GLMapRasterTileSource : NSObject

GLMapRasterTileSource is used to setup custom raster tile source.

  • Initializes tile source. If cachePath==nil no caching will happens.

    Declaration

    Objective-C

    - (instancetype _Nullable)initWithCachePath:(NSString *_Nullable)cachePath;
  • Gets url of tile. Default implementation reuturns nil.

    Declaration

    Objective-C

    - (NSURL *_Nullable)urlForTilePos:(GLMapTilePos)pos;
  • Gets image of tile. Default implementation reuturns nil.

    Declaration

    Objective-C

    - (UIImage *_Nullable)imageForTilePos:(GLMapTilePos)pos
                                  expired:(BOOL *_Nonnull)expired;
  • Gets image of tile. Default implementation reuturns nil.

    Declaration

    Objective-C

    - (void)saveTileData:(NSData *_Nonnull)data forTilePos:(GLMapTilePos)pos;
  • Cached tile will be refreshed if it will stay in cache more than given time.

    By default tileRefreshTimeInterval = -1. If tileRefreshTimeInterval < 0 no tile refreshing will be triggered.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) int64_t tileRefreshTimeInterval;
  • Defines valid zooms for tile source. Default is 0xFFFFFFFF.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) uint32_t validZoomMask;
  • Size of tile in points. Could be used to magnify raster tiles. Default is 256.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) uint32_t tileSize;
  • Sets attribution text for map source. Default is @© OpenStreetMap

    Declaration

    Objective-C

    @property (readwrite, strong, atomic) NSString *_Nullable attributionText;
  • Gets size of cache file

    Declaration

    Objective-C

    @property (readonly, atomic) uint64_t cacheSize;
  • Removes all cached data

    Declaration

    Objective-C

    - (void)dropCache;