SGAnnotationView |
Used to display information about SGAnnotation in an AR enviornment.
Superclass: UIView
Declared In: SGAnnotationView.h
SGAnnotationViews are the only views that can be rendered in the SGARView . The annotation view has two different modes, when it is being inspected and when it is not being inspected. You can toggle through inspection modes by calling inspectView: . When an annotation view is created it calls inspectView: on itself with the value NO. When NO is specifed the view enters into target mode. If YES is passed into inspectView: , the view switches to inspect mode. Target mode is intended to be just a target in in the AR enviornment; something that allows the user to inspect further by generating a touch event. When a touch event occurs on an annotation view, shouldInspectAnntationView: is called. Anytime throughout the life-cycle of the view, you can call inspectView: and it will change its subviews properly, independent of its enviornment. A SGAnnotationView has two display enviornments. The first is within the augmented reality view. The second is as a UIView was intended, using CoreAnimation. When the view is within the AR enviornment, the orign within the frame is ignored. The AR enviornment must place the view based on its relative position of the device and the coordinate obtained from annotation . When the annotation view is rendered as a UIView, in most cases, it will be a subview of SGARView.
Only works in inspector mode. Returns the view back to target mode.
The current implementation of this method does nothing. If enableOpenGL is set to YES, then this method will be called everytime the AR enviornment needs to render the view.
Initialize a new annotation view.
Changes the inspection type of the view.
Called when the view is removed from the reuse queue.
The UIImage that will be displayed when this view is added to an instance of SGAnnotationViewContainer . The default image is the UIImage representation of the current layout of the annotaiton view.
close |
Only works in inspector mode. Returns the view back to target mode.
- (void) close;
If the annotation view is a subview of the AR view, it will removeFromSuperview: and call inspectView: with NO. The annotation view should then return back to target mode join back with its brothers.
drawAnnotationView |
The current implementation of this method does nothing. If enableOpenGL is set to YES, then this method will be called everytime the AR enviornment needs to render the view.
- (void) drawAnnotationView;
initAtPoint:reuseIdentifier: |
Initialize a new annotation view.
- (id) initAtPoint:(CGPoint)pt reuseIdentifier:(NSString*)identifier;
pt
The origin of the view when it is not being drawn in the AR enviornment.
identifier
The identifier for the view.
A new instance of SGAnnotationView.
inspectView: |
Changes the inspection type of the view.
- (void) inspectView:(BOOL)inspect;
inspect
YES will put the view in inspect mode. NO wil put the view in target mode.
prepareForReuse |
Called when the view is removed from the reuse queue.
- (void) prepareForReuse;
The default implementaiton of this method resets its subviews. You can override it in your custom annotation views and use it to put the view in a specific state.
setContainerImage: |
The UIImage that will be displayed when this view is added to an instance of SGAnnotationViewContainer. The default image is the UIImage representation of the current layout of the annotaiton view.
- (void) setContainerImage:(UIImage*)image;
image

The altitude of the view. The default is 0. Altitude is expressed in meters.
The source of the view's location in the AR enviornment.
The bearing of the view calculated from the annotation and the device's current location. Bearing is expressed in radians.
A close button that is used when inspectorType is not in kSGAnnotationViewInspectorType_Custom and the view is in inspect mode.
The delegate that recieves inspection and close notifications.
A detailed label that is used when inspectorType is not kSGAnnotationViewInspectoryType_Custom and the view is in inspect mode.
The distance of the view calculated from the annotation and the device's current location. Distance is expressed in meters.
Ignores the UIView components of the view, and calls drawAnnotationView when it needs to be rendered in the AR enviornment.
The style of the view when it is being inspected.
If YES, the the view is in inspect mode. Otherwise; NO.
If YES, the view can be added to the SGMovableStack . Otherwise, NO.
A title label that is used when inspectorType is not in kSGAnnotationViewInspectorType_Custom and the view is in inspect mode.
A title label that is used when inspectorType is not in kSGAnnotationViewInspectorType_Custom and the view is in inspect mode.
The pin color to use when the view is in target mode and targetType is set kSGAnnotationViewTargetType_Pin . The default is kSGPinColor_Red .
The UIButton that is displayed in the SGRadar .
Use this identifier to dequeue unused annotation views from SGARView .
The image that is shown when the targetType is set to kSGAnnotationViewTargetType_Glass .
The style of the view when it is not being inspected.
A title label that is used when inspectorType is not in kSGAnnotationViewInspectorType_Custom and the view is in inspect mode.
altitude |
The altitude of the view. The default is 0. Altitude is expressed in meters.
@property ( nonatomic, assign) double altitude;
annotation |
The source of the view's location in the AR enviornment.
@property ( nonatomic, assign) id<MKAnnotation> annotation;
bearing |
The bearing of the view calculated from the annotation and the device's current location. Bearing is expressed in radians.
@property ( nonatomic, readonly) double bearing;
closeButton |
A close button that is used when inspectorType is not in kSGAnnotationViewInspectorType_Custom and the view is in inspect mode.
@property ( nonatomic, retain, readonly) UIButton* closeButton;
The default position is in the upper left-hand corner of the view.
delegate |
The delegate that recieves inspection and close notifications.
@property ( nonatomic, assign) id<SGAnnotationViewDelegate> delegate;
detailedLabel |
A detailed label that is used when inspectorType is not kSGAnnotationViewInspectoryType_Custom and the view is in inspect mode.
@property ( nonatomic, retain, readonly) UILabel* detailedLabel;
distance |
The distance of the view calculated from the annotation and the device's current location. Distance is expressed in meters.
@property ( nonatomic, readonly) double distance;
enableOpenGL |
Ignores the UIView components of the view, and calls drawAnnotationView when it needs to be rendered in the AR enviornment.
@property ( nonatomic, assign) BOOL enableOpenGL;
inspectorType |
The style of the view when it is being inspected.
@property ( nonatomic, assign) SGAnnotationViewInspectorType inspectorType;
isBeingInspected |
If YES, the the view is in inspect mode. Otherwise; NO.
@property ( nonatomic, readonly) BOOL isBeingInspected;
isCapturable |
If YES, the view can be added to the SGMovableStack. Otherwise, NO.
@property ( nonatomic, assign) BOOL isCapturable;
messageLabel |
A title label that is used when inspectorType is not in kSGAnnotationViewInspectorType_Custom and the view is in inspect mode.
@property ( nonatomic, retain, readonly) UILabel* messageLabel;
photoImageView |
A title label that is used when inspectorType is not in kSGAnnotationViewInspectorType_Custom and the view is in inspect mode.
@property ( nonatomic, retain, readonly) UIImageView* photoImageView;
pinColor |
The pin color to use when the view is in target mode and targetType is set kSGAnnotationViewTargetType_Pin . The default is kSGPinColor_Red.
@property ( nonatomic, assign) SGPinColor pinColor;
radarTargetButton |
The UIButton that is displayed in the SGRadar.
@property ( nonatomic, readonly) UIButton* radarTargetButton;
resuseIdentifier |
Use this identifier to dequeue unused annotation views from SGARView.
@property ( nonatomic, readonly) NSString* resuseIdentifier;
targetImageView |
The image that is shown when the targetType is set to kSGAnnotationViewTargetType_Glass.
@property ( nonatomic, retain, readonly) UIImageView* targetImageView;
targetType |
The style of the view when it is not being inspected.
@property ( nonatomic, assign) SGAnnotationViewTargetType targetType;
titleLabel |
A title label that is used when inspectorType is not in kSGAnnotationViewInspectorType_Custom and the view is in inspect mode.
@property ( nonatomic, retain, readonly) UILabel* titleLabel;
© SimpleGeo Last Updated: 03/31/2010