GLMapRasterTileSource


@interface GLMapRasterTileSource : GLMapTileSource

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;
  • Override this to implement custom caching. Default implementation does nothing.

    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 (atomic, assign, unsafe_unretained, readwrite)
        int64_t tileRefreshTimeInterval;
  • Defines valid zooms for tile source. Default is 0xFFFFFFFF.

    Declaration

    Objective-C

    @property (atomic, assign, unsafe_unretained, readwrite) uint32_t validZoomMask;
  • Allows overlap tiles from different zoom levels.

    Declaration

    Objective-C

    @property (atomic, assign, unsafe_unretained, readwrite) BOOL canOverlapTiles;
  • Allows to draw tiles after maximum zoom

    Declaration

    Objective-C

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

    Declaration

    Objective-C

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

    Declaration

    Objective-C

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

    Declaration

    Objective-C

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

    Declaration

    Objective-C

    - (void)dropCache;