|
高德地图SDK(导航)
V11.1.000
|
#import <MAOverlayRenderer.h>
Instance Methods | |
| (GLuint strokeTextureID) | - __attribute |
| (instancetype) | - initWithOverlay: |
| 初始化并返回一个Overlay Renderer initialize and return an Overlay Renderer More... | |
| (float *) | - getViewMatrix |
| 获取当前地图view矩阵,数组长度为16,无需外界释放. 需要添加至地图后,才能获取有效矩阵数据,否则返回NULL Get the current map view matrix with an array length of 16, no external release required. Valid matrix data can only be obtained after adding to the map, otherwise returns NULL. More... | |
| (float *) | - getProjectionMatrix |
| 获取当前地图projection矩阵,数组长度为16,无需外界释放. 需要添加至地图后,才能获取有效矩阵数据,否则返回NULL Get the current map projection matrix with an array length of 16, no need for external release. Valid matrix data can only be obtained after adding it to the map, otherwise returns NULL. More... | |
| (MAMapPoint) | - getOffsetPoint |
| 获取当前地图中心点偏移,用以把地图坐标转换为gl坐标。需要添加到地图获取才有效。(since 5.1.0) Get the current map center offset to convert map coordinates to gl coordinates. It only takes effect when added to map acquisition (since 5.1.0) More... | |
| (id< MTLRenderCommandEncoder >) | - getCommandEncoder |
| 获取Metal渲染MTLRenderCommandEncoder对象。注意:打开地图MetalEnable时有效,否则为nil(since 7.9.0) Obtain the Metal rendering MTLRenderCommandEncoder object. Note: It is valid when MetalEnable is turned on for the map, otherwise it is nil.(since 7.9.0) More... | |
| (CGFloat) | - getMapZoomLevel |
| 获取当前地图缩放级别,需要添加到地图获取才有效。(since 5.1.0) Get the current map zoom level, which is only valid when added to the map(since 5.1.0) More... | |
| (CGPoint) | - glPointForMapPoint: |
| 将MAMapPoint转换为opengles可以直接使用的坐标 Convert MAMapPoint to coordinates that can be directly used by OpenGLES More... | |
| (CGPoint *) | - glPointsForMapPoints:count: |
| 批量将MAMapPoint转换为opengles可以直接使用的坐标 Batch convert MAMapPoint to coordinates that can be directly used by opengles More... | |
| (CGFloat) | - glWidthForWindowWidth: |
| 将屏幕尺寸转换为OpenGLES尺寸 Convert screen size to OpenGLES size More... | |
| (void) | - glRender |
| 绘制函数(子类需要重载来实现) Drawing function (subclasses need to override to implement) More... | |
| (GLuint) | - loadTexture: |
| 加载纹理图片. 注意:仅使用gles环境(since 5.1.0) Load texture image. Note: Only use gles environment (since 5.1.0) More... | |
| (void) | - deleteTexture: |
| 删除纹理. 注意:仅使用gles环境(since 5.1.0) Delete texture. Note: Only use in GLES environment(since 5.1.0) More... | |
| (void) | - setNeedsUpdate |
| 当关联overlay对象有更新时,调用此接口刷新. since 5.0.0 Call this interface to refresh when the associated overlay object is updated. since 5.0.0 More... | |
Protected Attributes | |
| GLuint | _strokeTextureID |
| CGSize | _strokeTextureSize |
| BOOL | _needsUpdate |
| BOOL | _needsLoadStrokeTexture |
Properties | |
| id< MAOverlayRenderDelegate > | rendererDelegate |
| id< MAOverlay > | overlay |
| UIImage * | strokeImage |
| CGFloat | alpha |
| CGFloat | contentScale |
该类是地图覆盖物Renderer的基类, 提供绘制overlay的接口但并无实际的实现(render相关方法只能在重写后的glRender方法中使用) This class is the base class of the map overlay Renderer, providing an interface for drawing overlays but without actual implementation (render-related methods can only be used in the overridden glRender method)
| - (GLuint strokeTextureID) __attribute | ((deprecated("Deprecated, since 7.9.0"))) |
笔触纹理id, 修改纹理id参考, 如果strokeImage未指定、尚未加载或加载失败返回0. 注意:仅使用gles环境 Stroke texture ID, modify texture ID reference, returns 0 if strokeImage is not specified, not yet loaded, or fails to load. Note: Only use gles environment.
| - (void) deleteTexture: | ((deprecated("Deprecated, since 7.9.0"))) | __attribute |
删除纹理. 注意:仅使用gles环境(since 5.1.0) Delete texture. Note: Only use in GLES environment(since 5.1.0)
| textureId | 纹理ID Texture ID |
| - (id<MTLRenderCommandEncoder>) getCommandEncoder |
获取Metal渲染MTLRenderCommandEncoder对象。注意:打开地图MetalEnable时有效,否则为nil(since 7.9.0) Obtain the Metal rendering MTLRenderCommandEncoder object. Note: It is valid when MetalEnable is turned on for the map, otherwise it is nil.(since 7.9.0)
| - (CGFloat) getMapZoomLevel |
获取当前地图缩放级别,需要添加到地图获取才有效。(since 5.1.0) Get the current map zoom level, which is only valid when added to the map(since 5.1.0)
| - (MAMapPoint) getOffsetPoint |
获取当前地图中心点偏移,用以把地图坐标转换为gl坐标。需要添加到地图获取才有效。(since 5.1.0) Get the current map center offset to convert map coordinates to gl coordinates. It only takes effect when added to map acquisition (since 5.1.0)
| - (float *) getProjectionMatrix |
获取当前地图projection矩阵,数组长度为16,无需外界释放. 需要添加至地图后,才能获取有效矩阵数据,否则返回NULL Get the current map projection matrix with an array length of 16, no need for external release. Valid matrix data can only be obtained after adding it to the map, otherwise returns NULL.
| - (float *) getViewMatrix |
获取当前地图view矩阵,数组长度为16,无需外界释放. 需要添加至地图后,才能获取有效矩阵数据,否则返回NULL Get the current map view matrix with an array length of 16, no external release required. Valid matrix data can only be obtained after adding to the map, otherwise returns NULL.
| - (CGPoint) glPointForMapPoint: | (MAMapPoint) | mapPoint |
将MAMapPoint转换为opengles可以直接使用的坐标 Convert MAMapPoint to coordinates that can be directly used by OpenGLES
| mapPoint | MAMapPoint坐标 MAMapPoint coordinates |
| - (CGPoint *) glPointsForMapPoints: | (MAMapPoint *) | mapPoints | |
| count: | (NSUInteger) | count | |
批量将MAMapPoint转换为opengles可以直接使用的坐标 Batch convert MAMapPoint to coordinates that can be directly used by opengles
| mapPoints | MAMapPoint坐标数据指针 MAMapPoint coordinate data pointer |
| count | 个数 count |
| - (void) glRender |
绘制函数(子类需要重载来实现) Drawing function (subclasses need to override to implement)
| - (CGFloat) glWidthForWindowWidth: | (CGFloat) | windowWidth |
将屏幕尺寸转换为OpenGLES尺寸 Convert screen size to OpenGLES size
| windowWidth | 屏幕尺寸 Screen size |
| - (instancetype) initWithOverlay: | (id< MAOverlay >) | overlay |
初始化并返回一个Overlay Renderer initialize and return an Overlay Renderer
| overlay | 关联的overlay对象 associated overlay object |
| - (GLuint) loadTexture: | ((deprecated("Deprecated, since 7.9.0"))) | __attribute |
加载纹理图片. 注意:仅使用gles环境(since 5.1.0) Load texture image. Note: Only use gles environment (since 5.1.0)
| textureImage | 纹理图片(需满足:长宽相等,且宽度值为2的次幂) Texture image (must meet: width and height are equal, and width value is a power of 2) |
| - (void) setNeedsUpdate |
当关联overlay对象有更新时,调用此接口刷新. since 5.0.0 Call this interface to refresh when the associated overlay object is updated. since 5.0.0
|
protected |
|
protected |
|
protected |
|
protected |
|
readwritenonatomicassign |
透明度[0,1],默认为1. 使用MAOverlayRenderer类提供的渲染接口会自动应用此属性。(since 5.1.0) Opacity [0, 1], default is 1. This property will be automatically applied when using the rendering interface provided by the MAOverlayRenderer class. (since 5.1.0)
|
readnonatomicassign |
overlay渲染的scale。(since 5.1.0) Scale of overlay rendering.(since 5.1.0)
|
readnonatomicretain |
关联的overlay对象 Associated overlay object
|
readwritenonatomicweak |
由地图添加时,不要手动设置。如果不是使用mapview进行添加,则需要手动设置。(since 5.1.0) When added by the map, do not set manually. If not added using mapview, manual setting is required.(since 5.1.0)
|
readwritenonatomicstrong |
用于生成笔触纹理id的图片(支持非PowerOfTwo图片; 如果您需要减轻绘制产生的锯齿,您可以参考AMap.bundle中的traffic_texture_blue.png的方式,在image两边增加部分透明像素.)。(since 5.3.0) Images used to generate brush stroke texture IDs (supports non-PowerOfTwo images; if you need to reduce aliasing caused by drawing, you can refer to the method in AMap.bundle's traffic_texture_blue.png, adding partially transparent pixels on both sides of the image.). (since 5.3.0)