Map Doc  1.0
iOS-引擎SDK-开放平台
MBAnnotation.h
浏览该文件的文档.
1 //
2 // MBAnnotation.h
3 // Navigation
4 //
5 // Created by delon on 12-12-26.
6 //
7 //
8 
9 #import <UIKit/UIKit.h>
10 
11 #import "MBNaviCoreBase.h"
12 #import "MBObject.h"
13 
14 
18 @interface MBCustomIconData: NSObject
19 
29 - (instancetype)initWithBitmap:(UInt32 *)pixels width:(NSInteger) width height:(NSInteger)heigh;
30 
34 @property (nonatomic, assign) CGPoint pivot;
35 
36 - (void *)getHandle;
37 
38 @end
39 
43 typedef struct MBCalloutStyle
44 {
46  int titleSize;
50  unsigned int titleColor;
52  unsigned int subtitleColor;
54  unsigned int titleColorHighlighted;
58  int leftIcon;
60  int rightIcon;
62  CGPoint anchor;
64 
68 typedef NS_ENUM(NSInteger, MBAnnotationArea) {
74 };
75 
79 @interface MBAnnotation : NSObject
80 {
81  @package
82  void* _native;
83  BOOL _attatched;
84 }
85 
89 @property (nonatomic, assign) BOOL clickable;
93 @property (nonatomic, assign) MBPoint position;
97 @property (nonatomic, assign) MBNdsPoint ndsPosition;
101 @property (nonatomic, copy) NSString *title;
105 @property (nonatomic, copy) NSString *subTitle;
111 @property (nonatomic, assign) BOOL dropEnable;
118 @property (nonatomic, assign) int zLevel;
122 @property (nonatomic, assign) int tag;
126 @property (nonatomic, assign) BOOL selected;
130 @property (nonatomic, assign) BOOL hidden;
134 @property (nonatomic, assign) MBCalloutStyle calloutStyle;
135 
144 - (id)initWithZLevel:(int)zLevel pos:(MBPoint)pos iconId:(int)iconId pivot:(CGPoint)pivot;
145 - (id)initWithZLevel:(int)zLevel posNds:(MBNdsPoint)pos iconId:(int)iconId pivot:(CGPoint)pivot;
146 
155 - (id)initWithZLevel:(NSInteger)zLevel posNds:(MBNdsPoint)pos pivot:(CGPoint)pivot imageObject:(UIImage*)image;
156 - (id)initWithZLevel:(NSInteger)zLevel pos:(MBPoint)pos pivot:(CGPoint)pivot imageObject:(UIImage*)image;
157 
167 - (id)initWithZLevel:(NSInteger)zLevel pos:(MBPoint)pos pivot:(CGPoint)pivot iconData:(MBCustomIconData *)iconData;
168 - (id)initWithZLevel:(NSInteger)zLevel posNds:(MBNdsPoint)pos pivot:(CGPoint)pivot iconData:(MBCustomIconData *)iconData;
169 
176 - (void)setIcon:(int)iconId pivot:(CGPoint)pivot;
177 
185 - (void)setIconText:(NSString *)text color:(uint)color anchor:(CGPoint)anchor;
186 
194 - (void)setIconText:(NSString *)text UIColor:(UIColor *)color anchor:(CGPoint)anchor;
195 
201 - (void)setIconTextSize:(int)size;
202 
207 - (void)setNeedsDisplay;
208 
215 - (void)showCallout:(BOOL)show;
216 
222 - (MBAnnotationArea)hitTest:(MBRect)clickArea;
223 @end
Definition: MBNaviCoreBase.h:42
int subtitleSize
副标题字体
Definition: MBAnnotation.h:48
int titleSize
标题字体
Definition: MBAnnotation.h:46
unsigned int subtitleColor
副标题颜色
Definition: MBAnnotation.h:52
void setNeedsDisplay()
BOOL _attatched
Definition: MBAnnotation.h:83
MBNdsPoint ndsPosition
Definition: MBAnnotation.h:97
BOOL dropEnable
Definition: MBAnnotation.h:111
int tag
Definition: MBAnnotation.h:122
unsigned int subtitleColorHighlighted
副标题高亮
Definition: MBAnnotation.h:56
Definition: MBAnnotation.h:79
unsigned int titleColor
标题颜色
Definition: MBAnnotation.h:50
BOOL hidden
Definition: MBAnnotation.h:130
Definition: MBAnnotation.h:69
MBAnnotationArea
Definition: MBAnnotation.h:68
BOOL clickable
Definition: MBAnnotation.h:89
MBCalloutStyle calloutStyle
Definition: MBAnnotation.h:134
int leftIcon
左图标ID
Definition: MBAnnotation.h:58
int zLevel
Definition: MBAnnotation.h:118
BOOL selected
Definition: MBAnnotation.h:126
int rightIcon
右图标ID
Definition: MBAnnotation.h:60
Definition: MBAnnotation.h:71
Definition: MBAnnotation.h:72
Definition: MBAnnotation.h:70
Definition: MBAnnotation.h:73
Definition: MBAnnotation.h:43
unsigned int titleColorHighlighted
标题高亮
Definition: MBAnnotation.h:54
CGPoint pivot
Definition: MBAnnotation.h:34
NSString * subTitle
Definition: MBAnnotation.h:105
Definition: MBNaviCoreBase.h:67
CGPoint anchor
锚点
Definition: MBAnnotation.h:62
Definition: MBAnnotation.h:18
struct MBCalloutStyle MBCalloutStyle
NSString * title
Definition: MBAnnotation.h:101
MBPoint position
Definition: MBAnnotation.h:93
Definition: MBNaviCoreBase.h:31