立得地图iOS SDK 地图&搜索服务参考手册 V1.7.0
LMKOverlayView.h
浏览该文件的文档.
1 //
2 // LMKOverlayView.h
3 // LeadorMapSDK
4 //
5 // Copyright © 2016年 IShowChina. All rights reserved.
6 //
7 
8 #import "LMKGeometry.h"
9 #import "LMKLineDrawType.h"
10 #import "LMKOverlay.h"
11 #import <UIKit/UIKit.h>
12 
13 #define kLMKOverlayViewDefaultStrokeColor [UIColor colorWithRed:0.3 green:0.63 blue:0.89 alpha:0.8]
14 #define kLMKOverlayViewDefaultFillColor [UIColor colorWithRed:0.77 green:0.88 blue:0.94 alpha:0.8]
15 
19 @interface LMKOverlayView : UIView
20 
26 - (id)initWithOverlay:(id<LMKOverlay>)overlay;
27 
31 @property (nonatomic, readonly, strong) id<LMKOverlay> overlay;
32 
38 - (CGPoint)pointForMapPoint:(LMKMapPoint)mapPoint;
39 
45 - (LMKMapPoint)mapPointForPoint:(CGPoint)point;
46 
52 - (CGRect)rectForMapRect:(LMKMapRect)mapRect;
53 
59 - (LMKMapRect)mapRectForRect:(CGRect)rect;
60 
67 - (void)drawMapRect:(LMKMapRect)mapRect
68  zoomScale:(CGFloat)zoomScale
69  inContext:(CGContextRef)context;
70 
74 @property (nonatomic) int* g20MapPoints;
75 
79 @property (nonatomic) NSUInteger g20MapPointCount;
80 
87 - (int*)g20PointsForMapPoints:(LMKMapPoint*)mapPoints count:(NSUInteger)count;
88 
94 - (CGFloat)glWidthForWindowWidth:(CGFloat)windowWidth;
95 
99 - (void)referenceDidChange;
107 - (void)renderRegionWithPoints:(int *)points
108  pointCount:(NSUInteger)pointCount
109  fillColor:(UIColor *)fillColor
110  usingTriangleFan:(BOOL)usingTriangleFan;
116 - (void)renderIconWithTextureID:(GLuint)textureID points:(int *)points;
125 - (void)renderLinesWithPoints:(int*)points
126  pointCount:(NSUInteger)pointCount
127  strokeColor:(UIColor*)strokeColor
128  lineWidth:(CGFloat)lineWidth
129  looped:(BOOL)looped;
130 
142 - (void)renderLinesWithPoints:(int*)points
143  pointCount:(NSUInteger)pointCount
144  strokeColor:(UIColor*)strokeColor
145  lineWidth:(CGFloat)lineWidth
146  looped:(BOOL)looped
147  LineJoinType:(LMKLineJoinType)lineJoinType
148  LineCapType:(LMKLineCapType)lineCapType
149  lineDash:(BOOL)lineDash;
150 
163 - (void)renderLinesWithPoints:(int*)points
164  pointCount:(NSUInteger)pointCount
165  strokeColor:(UIColor*)strokeColor
166  lineWidth:(CGFloat)lineWidth
167  lineTextureID:(GLint)lineTextureID
168  texLen:(CGFloat)texLen
169  looped:(BOOL)looped
170  complex:(BOOL)complex;
181 - (void)renderLinesWithPoints:(int*)points
182  pointCount:(NSUInteger)pointCount
183  strokeColor:(UIColor*)strokeColor
184  lineWidth:(CGFloat)lineWidth
185  looped:(BOOL)looped
186  lineDash:(BOOL)lineDash
187  complex:(BOOL)complex;
188 
192 - (void)glRender;
193 
194 #pragma mark - draw property
195 
200 @property (nonatomic, readonly) GLuint strokeTextureID;
201 
207 - (GLuint)loadStrokeTextureImage:(UIImage*)textureImage;
208 
209 @end
该类是地图覆盖物的基类,所有地图的覆盖物需要继承自此类
Definition: LMKOverlay.h:14
地图投影点,用平面直角坐标表示(20级像素坐标)。
Definition: LMKGeometry.h:31
void referenceDidChange()
OpenGLES坐标系发生改变, 重新计算缓存的OpenGLES坐标
void glRender()
绘制函数(子类需要重载来实现)
LMKLineJoinType
Definition: LMKLineDrawType.h:11
int * g20MapPoints
缓存的G20坐标
Definition: LMKOverlayView.h:74
LMKLineCapType
Definition: LMKLineDrawType.h:18
NSUInteger g20MapPointCount
缓存的G20坐标 个数
Definition: LMKOverlayView.h:79
GLuint strokeTextureID
笔触纹理id 修改纹理id参考 - (GLuint)loadStrokeTextureImage:textureImage;
Definition: LMKOverlayView.h:200
该类是地图覆盖物View的基类, 提供绘制overlay的接口但并无实际的实现
Definition: LMKOverlayView.h:19
平面投影矩形结构定义
Definition: LMKGeometry.h:45