BaiduMap_IOSSDK_v6.6.2_Docs 6.6.2
|
该类是地图覆盖物View的基类,提供绘制overlay的接口但本身并无实现,所有地图覆盖物View需要继承自此类 更多...
#include <BMKOverlayView.h>
Protected 属性 | ||
package id< BMKOverlay > | _overlay | |
BMKMapRect | _boundingMapRect | |
CGAffineTransform | _mapTransform | |
id | _geometryDelegate | |
id | _canDrawCache | |
BOOL | keepScale | |
CFTimeInterval | _lastTile | |
CFRunLoopTimerRef | _scheduledScaleTimer | |
struct { | ||
unsigned int keepAlive:1 | ||
unsigned int levelCrossFade:1 | ||
unsigned int drawingDisabled:1 | ||
unsigned int usesTiledLayer:1 | ||
} | _flags | |
属性 | |
id< BMKOverlay > | overlay |
关联的overlay对象 | |
GLuint | strokeTextureID |
关联的纹理对象ID | |
该类是地图覆盖物View的基类,提供绘制overlay的接口但本身并无实现,所有地图覆盖物View需要继承自此类
- (BOOL) canDrawMapRect: | (BMKMapRect) | mapRect | |
zoomScale: | (BMKZoomScale) | zoomScale |
判断ovlerlay view是否准备绘制内容 默认返回YES,如果用户设为NO,当需要绘制内容时要显示调用setNeedsDisplayInMapRect:zoomScale:方法
mapRect | 需要更新的地图矩形区域 |
zoomScale | 当前的缩放因子 |
- (void) drawMapRect: | (BMKMapRect) | mapRect | |
zoomScale: | (BMKZoomScale) | zoomScale | |
inContext: | (CGContextRef) | context |
绘制overlay view内容 该方法默认不做任何事,子类需要重载该方法来绘制view的内容
mapRect | 需要更新的地图矩形区域 |
zoomScale | 当前的缩放因子 |
context | 使用的graphics context |
- (void) glRender |
绘制函数(子类需要重载来实现) since 6.0.0 无效
- (nullable instancetype) initWithOverlay: | (id< BMKOverlay >) | overlay |
初始化并返回一个overlay view
overlay | 关联的overlay对象 |
- (GLuint) loadStrokeTextureImage: | ("已废弃since 6.5.0,请使用BMKOverlayGLBasicView中textureImage字段") | __deprecated_msg |
加载纹理图片
textureImage | 图片对象,opengl要求图片宽高必须是2的n次幂,如果图片对象为nil,则清空原有纹理 |
- (BOOL) loadStrokeTextureImages: | ("已废弃since 6.5.0,请使用BMKMultiTexturePolylineView中textureImages字段") | __deprecated_msg |
加载分段纹理绘制 所需的纹理图片
textureImages | 必须UIImage数组,opengl要求图片宽高必须是2的n次幂,否则,返回NO,无法分段纹理绘制 |
- (BMKMapPoint) mapPointForPoint: | (CGPoint) | point |
将overlay view坐标转为直角坐标
point | view坐标 |
- (BMKMapRect) mapRectForRect: | (CGRect) | rect |
将overlay view区域转为二维地图投影区域
rect | 指定的view矩形 |
- (CGPoint) pointForMapPoint: | (BMKMapPoint) | mapPoint |
将直角坐标转为overlay view坐标
mapPoint | 直角坐标 |
- (CGRect) rectForMapRect: | (BMKMapRect) | mapRect |
将二维地图投影矩形转为overlay view矩形
mapRect | 二维地图投影矩形 |
- (void) rendeCircleWithPoints: | (BMKMapPoint *) | points | |
pointCount: | (NSUInteger) | pointCount | |
lineWidth: | (CGFloat) | lineWidth | |
fillColor: | (UIColor *) | fillColor | |
strokeColor: | ("已废弃since 6.0.0,内部无实现") | __deprecated_msg |
使用OpenGLES 绘制圆
points | 直角坐标点 |
pointCount | 点个数 |
lineWidth | 线宽 |
fillColor | 填充颜色 |
strokeColor | 线颜色 |
- (void) rendePolygonWithPoints: | (BMKMapPoint *) | points | |
pointCount: | (NSUInteger) | pointCount | |
lineWidth: | (CGFloat) | lineWidth | |
fillColor: | (UIColor *) | fillColor | |
strokeColor: | ("已废弃since 6.0.0,内部无实现") | __deprecated_msg |
使用OpenGLES 绘制Polygon
points | 直角坐标点 |
pointCount | 点个数 |
lineWidth | 线宽 |
fillColor | 填充颜色 |
strokeColor | 线颜色 |
- (void) renderATRegionWithPoint: | (BMKMapPoint *) | points | |
pointCount: | (NSUInteger) | pointCount | |
fillColor: | (UIColor *) | fillColor | |
usingTriangleFan: | ("已废弃since 6.0.0,内部无实现") | __deprecated_msg |
使用OpenGLES 绘制区域(支持凹多边形)
points | 直角坐标点 |
pointCount | 点个数 |
fillColor | 填充颜色 |
usingTriangleFan | YES对应GL_TRIANGLE_FAN, NO对应GL_TRIANGLES |
- (void) renderDashPolyLineWithPoints: | (NSArray< NSValue * > *) | points | |
lineWidth: | (CGFloat) | lineWidth | |
strokeColor: | (UIColor *) | strokeColor | |
lineDashType: | ("已废弃since 6.0.0,内部无实现") | __deprecated_msg |
使用OpenGLES 按指定单色绘制虚线 since 5.0.0
points | 墨卡托坐标点转换的NSValue |
lineWidth | OpenGLES支持线宽尺寸 |
strokeColor | 虚线颜色 |
lineDashType | 虚线样式 |
- (void) renderLinesWithPoints: | (BMKMapPoint *) | points | |
pointCount: | (NSUInteger) | pointCount | |
strokeColor: | (UIColor *) | strokeColor | |
lineWidth: | (CGFloat) | lineWidth | |
looped: | ("已废弃since 6.0.0,内部无实现") | __deprecated_msg |
使用OpenGLES 指定颜色绘制线
points | 直角坐标点 |
pointCount | 点个数 |
strokeColor | 线颜色 |
lineWidth | OpenGLES支持线宽尺寸 |
looped | 是否闭合, 如polyline会设置NO, polygon会设置YES. |
- (void) renderLinesWithPoints: | (BMKMapPoint *) | points | |
pointCount: | (NSUInteger) | pointCount | |
strokeColor: | (UIColor *) | strokeColor | |
lineWidth: | (CGFloat) | lineWidth | |
looped: | (BOOL) | looped | |
lineDash: | ("已废弃since 5.0.0,内部无实现,请使用renderLinesWithPoints: pointCount: strokeColor: lineWidth:looped: lineDashType:") | __deprecated_msg |
使用OpenGLES 绘制线
points | 直角坐标点 |
pointCount | 点个数 |
strokeColor | 线颜色 |
lineWidth | OpenGLES支持线宽尺寸 |
looped | 是否闭合, 如polyline会设置NO, polygon会设置YES. |
lineDash | 是否虚线样式 |
- (void) renderLinesWithPoints: | (BMKMapPoint *) | points | |
pointCount: | (NSUInteger) | pointCount | |
strokeColor: | (UIColor *) | strokeColor | |
lineWidth: | (CGFloat) | lineWidth | |
looped: | (BOOL) | looped | |
lineDashType: | ("已废弃since 6.0.0,内部无实现") | __deprecated_msg |
使用OpenGLES 指定颜色绘制线 since 5.0.0
points | 直角坐标点 |
pointCount | 点个数 |
strokeColor | 线颜色 |
lineWidth | OpenGLES支持线宽尺寸 |
looped | 是否闭合, 如polyline会设置NO, polygon会设置YES. |
lineDashType | 虚线样式 |
- (void) renderMultiDashPolyLineWithPartPoints: | (NSArray *) | partPt | |
lineWidth: | (CGFloat) | lineWidth | |
textureIndexs: | (NSArray< NSNumber * > *) | textureIndexs | |
lineDashType: | ("已废弃since 6.0.0,内部无实现") | __deprecated_msg |
使用OpenGLES 分段多颜色虚线 since 5.0.0
partPt | 分段墨卡托坐标点转换为的NSValue |
lineWidth | OpenGLES支持线宽尺寸 |
textureIndexs | 分段纹理索引,使用colors;加载 |
lineDashType | 虚线样式 |
- (void) renderMultiTexturedPolyLineWithPartPoints: | (NSArray *) | partPt | |
lineWidth: | (CGFloat) | lineWidth | |
textureIndexs: | (NSArray< NSNumber * > *) | textureIndexs | |
isFoucs: | (BOOL) | isFoucs | |
keepScale: | (BOOL) | keepScale | |
lineJoinType: | (BMKLineJoinType) | lineJoinType | |
lineCapType: | ("已废弃since 6.0.0,内部无实现") | __deprecated_msg |
使用OpenGLES 分段多纹理/多颜色绘制线 since 5.0.0
partPt | 分段墨卡托坐标点转换为的NSValue |
lineWidth | OpenGLES支持线宽尺寸 |
textureIndexs | 分段纹理索引,使用- (BOOL)loadStrokeTextureImages:(UIImage *)textureImage;加载 |
isFoucs | 高亮(该属性已废弃) |
keepScale | 纹理图片是否缩放(纹理绘制生效) |
lineJoinType | 拐角衔接方式(默认kBMKLineJoinBevel) |
lineCapType | 头尾处理样式(默认kBMKLineCapButt) |
- (void) renderRegionWithPoints: | (BMKMapPoint *) | points | |
pointCount: | (NSUInteger) | pointCount | |
fillColor: | (UIColor *) | fillColor | |
usingTriangleFan: | ("已废弃since 6.0.0,内部无实现") | __deprecated_msg |
使用OpenGLES 绘制区域
points | 直角坐标点 |
pointCount | 点个数 |
fillColor | 填充颜色 |
usingTriangleFan | YES对应GL_TRIANGLE_FAN, NO对应GL_TRIANGLES |
- (void) renderTexturedLinesWithPartPoints: | (NSArray *) | partPt | |
lineWidth: | (CGFloat) | lineWidth | |
textureIndexs: | (NSArray *) | textureIndexs | |
isFocus: | ("已废弃since 5.0.0,内部无实现") | __deprecated_msg |
使用OpenGLES 分段纹理绘制线
partPt | 分段直角坐标点 |
lineWidth | OpenGLES支持线宽尺寸 |
textureIndexs | 分段纹理索引,使用- (void)loadStrokeTextureImage:(UIImage *)textureImage;加载 |
isFoucs | 是否使用分段纹理绘制 |
- (void) renderTexturedLinesWithPartPoints: | (NSArray *) | partPt | |
lineWidth: | (CGFloat) | lineWidth | |
textureIndexs: | (NSArray *) | textureIndexs | |
isFocus: | (BOOL) | isFoucs | |
tileTexture: | (BOOL) | tileTexture | |
keepScale: | ("已废弃since 5.0.0,内部无实现,请使用renderMultiTexturedPolyLine") | __deprecated_msg |
使用OpenGLES 分段纹理绘制线
partPt | 分段直角坐标点 |
lineWidth | OpenGLES支持线宽尺寸 |
textureIndexs | 分段纹理索引,使用- (void)loadStrokeTextureImage:(UIImage *)textureImage;加载 |
isFoucs | 是否使用分段纹理绘制 |
tileTexture | 是否纹理图片平铺绘制 |
keepscale | 纹理图片是否缩放(tileTexture为YES时生效) |
- (void) renderTexturedLinesWithPoints: | (BMKMapPoint *) | points | |
pointCount: | (NSUInteger) | pointCount | |
lineWidth: | (CGFloat) | lineWidth | |
textureID: | (GLuint) | textureID | |
looped: | ("已废弃since 6.0.0,内部无实现") | __deprecated_msg |
使用OpenGLES 按指定纹理绘制线
points | 直角坐标点 |
pointCount | 点个数 |
lineWidth | OpenGLES支持线宽尺寸 |
textureID | 纹理ID,使用- (void)loadStrokeTextureImage:(UIImage *)textureImage;加载 |
looped | 是否闭合, 如polyline会设置NO, polygon会设置YES. |
- (void) renderTexturedLinesWithPoints: | (BMKMapPoint *) | points | |
pointCount: | (NSUInteger) | pointCount | |
lineWidth: | (CGFloat) | lineWidth | |
textureID: | (GLuint) | textureID | |
strokeColor: | (UIColor *) | strokeColor | |
looped: | (BOOL) | looped | |
tileTexture: | (BOOL) | tileTexture | |
keepScale: | ("已废弃since 6.0.0,内部无实现") | __deprecated_msg |
使用OpenGLES 按指定单纹理/单色绘制线
points | 直角坐标点 |
pointCount | 点个数 |
lineWidth | OpenGLES支持线宽尺寸 |
textureID | 纹理ID,使用- (void)loadStrokeTextureImage:(UIImage *)textureImage;加载 |
strokeColor | 画笔颜色 |
looped | 是否闭合, 如polyline会设置NO, polygon会设置YES. |
tileTexture | 是否纹理图片平铺绘制 |
keepScale | 纹理图片是否缩放(tileTexture为YES时生效) |
- (void) renderTexturedPolyLineWithPoints: | (NSArray< NSValue * > *) | points | |
lineWidth: | (CGFloat) | lineWidth | |
textureID: | (GLuint) | textureID | |
strokeColor: | (UIColor *) | strokeColor | |
isFoucs: | (BOOL) | isFoucs | |
keepScale: | (BOOL) | keepScale | |
lineJoinType: | (BMKLineJoinType) | lineJoinType | |
lineCapType: | ("已废弃since 6.0.0,内部无实现") | __deprecated_msg |
使用OpenGLES 按指定单色/单纹理绘制线 since 5.0.0
points | 墨卡托坐标点转换的NSValue |
lineWidth | OpenGLES支持线宽尺寸 |
textureID | 纹理ID,使用- (void)loadStrokeTextureImage:(UIImage *)textureImage;加载 |
strokeColor | 线颜色 |
isFoucs | 高亮(该属性已废弃) |
keepScale | 纹理图片是否缩放((纹理绘制生效) |
lineJoinType | 拐角衔接方式(默认kBMKLineJoinBevel) |
lineCapType | 头部处理方式(默认kBMKLineCapButt) |
- (void) setNeedsDisplayInMapRect: | (BMKMapRect) | mapRect |
使view在给定矩形的区域无效,系统将重绘该区域
mapRect | 需要更新的区域 |
- (void) setOverlayGeometryDelegate: | (id) | delegate |
设置该overlay的GeometryDelegate
|
protected |
|
protected |
struct { ... } BMKOverlayView::_flags |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
- (unsigned int) drawingDisabled |
- (unsigned int) keepAlive |
|
protected |
- (unsigned int) levelCrossFade |
- (unsigned int) usesTiledLayer |
|
readnonatomicassign |
关联的overlay对象
|
readnonatomicassign |
关联的纹理对象ID