Library Mobile API Reference for iPad  MicroStrategy 2019
MSIMWAnnotation.h
Go to the documentation of this file.
1 //
2 // MWAnnotationData.h
3 // MSTRMobile
4 //
5 // Created by Xi Zhang on 3/20/10.
6 // Copyright 2009 MicroStrategy. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import <MapKit/MapKit.h>
11 #import <CoreLocation/CoreLocation.h>
12 #import "Enums.h"
13 #import "MSIMapEnums.h"
14 #import "MWAnnotationInfo.h"
15 #import "MWOverlayDelegates.h"
16 
17 @class MSIMetric;
18 @class MSIHeaderValue, MWNetworkElement;
20 @class MSIMWLayer;
21 
22 @interface MSIMWAnnotation : NSObject <MKAnnotation, MWOverlayMetaData> {
23 
24 @protected
25 
26  NSString *subtitle;
27  NSString *title;
28 
30 
31  // map data from grid or form list.
33 
37  NSString *annotId;
38 
39  NSMutableArray* gridAttributeInfo;
40  NSInteger formCount;
41  NSInteger metricCount;
42  UIColor* color;
43  NSString* imagePath;
44  NSString* drillURLString;
45  UIImage * annotationImage;
46  UIImageView* annotationImageView;
47 
49 
50  // absolute row index
51  NSInteger rowIndex;
52  // internal row index.
55 
56  NSInteger displayMode;
57  NSMutableDictionary* affinityElements;
58 
59  /* Holds the information related to the annotation and performs operations on the grid iterator on the annotation's behalf. */
61  /* Which rows in the report data does this annotation correspond for? */
62  NSMutableArray *rowIndexes;
64 
65  CLLocationCoordinate2D coordinate;
67  BOOL cloned;
68 
69  NSInteger layerIndex;
70 }
71 
72 -(id)initWithLat:(CLLocationDegrees)lat Lng:(CLLocationDegrees)lng;
73 - (instancetype)initWithUnitTestName:(NSString *)name;
74 
75 - (NSString *)getFirstAttributeDisplayFormValue;
76 -(NSString*) formNameForIndex:(NSInteger)index;
77 -(NSString*) formValueForIndex:(NSInteger)index;
78 -(NSString*) metricNameForIndex:(NSInteger)index;
79 -(NSString*) metricValueForIndex:(NSInteger)index;
80 -(NSString*) metricRawValueForIndex:(NSInteger)index forSubTotal:(BOOL)subtotal;
81 -(NSString*)metricNonThresholdValueForIndex:(NSInteger)index;
82 -(UIColor*) metricColorForIndex:(NSInteger)index defaultColor:(UIColor*)defColor;
83 -(BOOL) metricBoldForIndex:(NSInteger)index;
84 -(BOOL) metricItalicForIndex:(NSInteger)index;
85 -(NSInteger) metricFontSizeForIndex:(NSInteger)index;
86 
87 -(NSInteger) semanticsForMetricIndex:(NSInteger)index;
88 // add an network element object directly.
89 -(void)addNetworkElement:(MWNetworkElement*)element;
90 -(void)setColorForAnnotationWithIndex:(NSInteger)metricIndex withOpacity:(double) opacity defaultColor:(UIColor *)defaultColor;
91 
92 // how far a coordinate from this annotation.
93 - (PositionTypes)positionAnnotationWithCoordinate:(CLLocationCoordinate2D)coord gridRadius:(CLLocationDegrees)gridRadius;
94 - (CGFloat)distanceFromCoordinate:(CLLocationCoordinate2D)coord;
95 
96 - (NSInteger)count;
97 
98 - (void) clearAllSelection;
99 
100 -(BOOL) isUsedInAffinityLines;
101 -(BOOL) isRestStatus;
102 -(BOOL) isBeingSelected;
103 
104 // communication APIs.
105 -(NSString*)getPhoneNumber;
106 -(NSString*)getEmailAddress;
107 - (NSString *)getDataLabelStringWith:(DataLabelShownType)dataLabelShownType;
108 
109 
110 @property(nonatomic,copy) NSString *subtitle;
111 @property(nonatomic,copy) NSString *title;
112 @property(nonatomic, assign) CLLocationCoordinate2D coordinate;
113 
114 @property(nonatomic, assign) BOOL coordinateIsAvailable;
115 
116 @property(nonatomic, assign) MapDataTypes dataType;
117 @property(nonatomic, assign) BOOL singleSelected;
118 @property(nonatomic, assign) BOOL multiSelected;
119 @property(nonatomic, assign) BOOL multiSelectedSingle;
120 @property(nonatomic, assign) BOOL halfSelected;
121 
122 @property(nonatomic, strong) NSMutableArray* gridAttributeInfo;
123 @property(nonatomic, assign) NSInteger formCount;
124 @property(nonatomic, assign) NSInteger metricCount;
125 @property(nonatomic, assign) NSInteger displayMode;
126 
127 @property(nonatomic, strong) UIColor* color;
128 @property(nonatomic, copy) NSString* imagePath;
129 @property(nonatomic, copy) NSString* drillURLString;
130 @property(nonatomic, retain) UIImage * annotationImage;
131 @property(nonatomic, retain) UIImageView* annotationImageView;
132 
133 @property (nonatomic, assign) NSInteger selectedMetricIndex;
134 
135 //used for selection in ipad
136 @property (nonatomic, assign) NSInteger rowIndex;
137 
138 @property (nonatomic, assign) NSInteger currentRowIndexInAnnotation;
139 @property (nonatomic, assign) BOOL subtotalOnTop;
140 
141 // associated affinity elements.
142 @property(nonatomic, readonly) NSMutableDictionary* affinityElements;
143 
144 @property(nonatomic, copy) NSString *annotId;
145 @property(nonatomic, strong) MWAnnotationInfo *annotationInfo;
146 @property(nonatomic, readonly) NSMutableArray *rowIndexes;
147 @property(nonatomic, copy) NSString* firstNonGeoFormValue;
148 
149 @property (nonatomic, weak) MWClusteredAnnotation* parent;
150 @property (nonatomic, assign) BOOL cloned;
151 @property (nonatomic) NSInteger layerIndex;
152 
153 @property (nonatomic) NSInteger defaultColorByIndex;
154 
155 @end
BOOL subtotalOnTop
Definition: MSIMWAnnotation.h:54
Definition: MSIHeaderValue.h:11
NSString * annotId
Definition: MSIMWAnnotation.h:37
BOOL cloned
Definition: MSIMWAnnotation.h:67
NSInteger rowIndex
Definition: MSIMWAnnotation.h:51
NSString * subtitle
Definition: MSIMWAnnotation.h:26
Definition: MWAnnotationInfo.h:12
enum _MapDataTypes MapDataTypes
MWAnnotationInfo * annotationInfo
Definition: MSIMWAnnotation.h:60
BOOL multiSelectedSingle
Definition: MSIMWAnnotation.h:36
NSMutableArray * gridAttributeInfo
Definition: MSIMWAnnotation.h:39
UIImage * annotationImage
Definition: MSIMWAnnotation.h:45
Definition: Metric.h:14
NSInteger metricCount
Definition: MSIMWAnnotation.h:41
enum _PositionTypes PositionTypes
NSString * drillURLString
Definition: MSIMWAnnotation.h:44
UIImageView * annotationImageView
Definition: MSIMWAnnotation.h:46
NSString * imagePath
Definition: MSIMWAnnotation.h:43
MapDataTypes dataType
Definition: MSIMWAnnotation.h:32
Definition: MSIMWAnnotation.h:22
CLLocationCoordinate2D coordinate
Definition: MSIMWAnnotation.h:65
Definition: MWClusteredAnnotation.h:13
NSInteger currentRowIndexInAnnotation
Definition: MSIMWAnnotation.h:53
NSInteger formCount
Definition: MSIMWAnnotation.h:40
UIColor * color
Definition: MSIMWAnnotation.h:42
NSInteger selectedMetricIndex
Definition: MSIMWAnnotation.h:48
BOOL multiSelected
Definition: MSIMWAnnotation.h:35
Definition: MSIMWLayer.h:38
NSString * firstNonGeoFormValue
Definition: MSIMWAnnotation.h:63
MWClusteredAnnotation *__weak parent
Definition: MSIMWAnnotation.h:66
NSInteger layerIndex
Definition: MSIMWAnnotation.h:69
NSInteger displayMode
Definition: MSIMWAnnotation.h:56
NSMutableDictionary * affinityElements
Definition: MSIMWAnnotation.h:57
NSMutableArray * rowIndexes
Definition: MSIMWAnnotation.h:62
BOOL coordinateIsAvailable
Definition: MSIMWAnnotation.h:29
BOOL singleSelected
Definition: MSIMWAnnotation.h:34
NSString * title
Definition: MSIMWAnnotation.h:27