iOS高德地图SDK(2D)  v5.6.0
MATileOverlay Class Reference

该类是覆盖在球面墨卡托投影上的图片tiles的数据源 More...

#import <MATileOverlay.h>

Inheritance diagram for MATileOverlay:
MAHeatMapTileOverlay

Instance Methods

(instancetype) - initWithURLTemplate:
 根据指定的URLTemplate生成tileOverlay More...
 
(NSURL *) - URLForTilePath:
 以tile path生成URL。用于加载tile,此方法默认填充URLTemplate More...
 
(void) - loadTileAtPath:result:
 加载被请求的tile,并以tile数据或加载tile失败error访问回调block;默认实现为首先用URLForTilePath去获取URL,然后用异步NSURLConnection加载tile More...
 

Properties

CGSize tileSize
 默认tileSize 256x256 More...
 
NSInteger minimumZ
 overlay可以渲染的最小缩放级别。当0级时,一个tile覆盖整个世界范围,1级时覆盖 1/4th 世界,2级时1/16th,以此类推。 More...
 
NSInteger maximumZ
 overlay可以渲染的最大缩放级别。 More...
 
NSString * URLTemplate
 同initWithURLTemplate:中的URLTemplate More...
 
BOOL canReplaceMapContent
 暂未开放 More...
 
MAMapRect boundingMapRect
 区域外接矩形,可用来设定tileOverlay的可渲染区域 More...
 

Detailed Description

该类是覆盖在球面墨卡托投影上的图片tiles的数据源

Method Documentation

◆ initWithURLTemplate:()

- (instancetype) initWithURLTemplate: (NSString *)  URLTemplate

根据指定的URLTemplate生成tileOverlay

Parameters
URLTemplateURLTemplate是一个包含"{x}","{y}","{z}","{scale}"的字符串,"{x}","{y}","{z}","{scale}"会被tile path的值所替换,并生成用来加载tile图片数据的URL 。例如 http://server/path?x={x}&y={y}&z={z}&scale={scale}
Returns
以指定的URLTemplate字符串生成tileOverlay

◆ loadTileAtPath:result:()

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

加载被请求的tile,并以tile数据或加载tile失败error访问回调block;默认实现为首先用URLForTilePath去获取URL,然后用异步NSURLConnection加载tile

Parameters
pathtile path
result用来传入tile数据或加载tile失败的error访问的回调block

Provided by category MATileOverlay(CustomLoading).

◆ URLForTilePath:()

- (NSURL *) URLForTilePath: (MATileOverlayPath path

以tile path生成URL。用于加载tile,此方法默认填充URLTemplate

Parameters
pathtile path
Returns
以tile path生成tileOverlay

Provided by category MATileOverlay(CustomLoading).

Property Documentation

◆ boundingMapRect

- (MAMapRect) boundingMapRect
readwritenonatomicassign

区域外接矩形,可用来设定tileOverlay的可渲染区域

◆ canReplaceMapContent

- (BOOL) canReplaceMapContent
readwritenonatomicassign

暂未开放

◆ maximumZ

- (NSInteger) maximumZ
readwriteatomic

overlay可以渲染的最大缩放级别。

◆ minimumZ

- (NSInteger) minimumZ
readwriteatomic

overlay可以渲染的最小缩放级别。当0级时,一个tile覆盖整个世界范围,1级时覆盖 1/4th 世界,2级时1/16th,以此类推。

◆ tileSize

- (CGSize) tileSize
readwriteatomic

默认tileSize 256x256

◆ URLTemplate

- (NSString*) URLTemplate
readatomicassign

同initWithURLTemplate:中的URLTemplate


The documentation for this class was generated from the following file:
© 2017 高德信息技术有限公司 版权所有,保留所有权利。