TencentMapSDK_iOS_3D_v5.7.0
QTileOverlay类 参考

用于自定义瓦片数据的类 更多...

#import <QTileOverlay.h>

类 QTileOverlay 继承关系图:
<QOverlay> QHeatTileOverlay

构造函数

(instancetype) - initWithURLTemplate:
 QTileOverlay 的构造函数. 更多...
 
(NSURL *) - URLForTilePath:
 tile 的URL 更多...
 
(void) - loadTileAtPath:result:
 加载tileOverlay函数 (调用URLForTilePath 获取URL 启动内部的异步网络数据加载) 更多...
 
(void) - cancelLoadOfTileAtPath:
 取消本瓦片下载. 当地图显示区域发生变化时,会取消显示区域外的瓦片的下载. 更多...
 

Protected 属性

package QMapRect _boundingRect
 

属性

NSString * URLTemplate
 tile的URL格式
 
BOOL isHighResoultionTile
 resolution=512x512 or 256x256
 
NSString * tileCacheDir
 自定义瓦片的自定义存储目录,如不设置则不使用缓存
 
BOOL enableReuseOnMultiLevel
 是否开启多级复用,默认为NO,若当前层级瓦片不存在,则复用临近级别的瓦片数据.
 
- 属性 继承自 <QOverlay>
QMapRect boundingMapRect
 区域外接矩形
 

详细描述

用于自定义瓦片数据的类

函数文档

◆ cancelLoadOfTileAtPath:

- (void) cancelLoadOfTileAtPath: (QTileOverlayPath tilePath

取消本瓦片下载. 当地图显示区域发生变化时,会取消显示区域外的瓦片的下载.

有可能子线程调用. 子类重载时不需要调用super 已cancel的瓦片请不要再调用loadTileAtPath:result中的result回调

由 category QTileOverlay(CustomLoading) 提供.

◆ initWithURLTemplate:

- (instancetype) initWithURLTemplate: (NSString *)  URLTemplate

QTileOverlay 的构造函数.

参数
URLTemplatetile的URL格式.URL格式请参照苹果MKTileOverlay接口格式

URL template is a string where the substrings "{x}", "{y}", "{z}", and "{scale}" are replaced with values from a tile path to create a URL to load. For example: http://server/path?x={x}&y={y}&z={z}&scale={scale}

◆ loadTileAtPath:result:

- (void) loadTileAtPath: (QTileOverlayPath path
result: (void(^)(NSData *tileData, NSError *error))  result 

加载tileOverlay函数 (调用URLForTilePath 获取URL 启动内部的异步网络数据加载)

参数
pathtile 的索引

开发者可在子类重载实现来满足自定义功能。有可能子线程调用. 子类重载时不需要调用super

由 category QTileOverlay(CustomLoading) 提供.

◆ URLForTilePath:

- (NSURL *) URLForTilePath: (QTileOverlayPath path

tile 的URL

参数
pathpath

有可能子线程调用. 子类重载时不需要调用super

由 category QTileOverlay(CustomLoading) 提供.


该类的文档由以下文件生成: