SGRadar |
A radar shows the current heading of the device based on the true north value gathered from CoreLocation. It is also the job of the radar to display the SGRecordAnnotations in the proper position based on their geographic coordinate and the current location of the device.
Superclass: UIView
Declared In: SGRadar.h
For every annotation view that is registered with the SGARView , the radarTargetButton is added as a subview of this view.
Both the heading and the radar can be represented by separate images. The default representation calls upon CoreGraphics to render the simple shapes. You can change the colors of the default representation by calling radarBorderColor , radarCircleColor and headingColor. If no image is present in either 3 image views, the default representation will persist.
This method is called whenever the radar needs to redisplayed.
Returns the label associated with the SGCardinalDirection .
drawRadarWithHeading:roll: |
This method is called whenever the radar needs to redisplayed.
- (void) drawRadarWithHeading:(double)heading roll:(double)roll;
heading

roll

Since the radar's orientation depends upon the heading and z axis orientation of the device, the view must be updated constantly.
labelForCardinalDirection: |
Returns the label associated with the SGCardinalDirection.
- (UILabel*) labelForCardinalDirection:(SGCardinalDirection)direction;
direction
The direction of the desired label.
The label.
The amount of pixel separation between a cardinal direction label and the radar image. A negative value will decrease the distance while a postivie value with increase the distance.
The image view that represents the the devices current location.
The color of the header circular segment. The default RGBA value is 1.0, 1.0, 1.0, 0.7.
The image view that contains the image used for the heading.
The background image view of the radar.
The border color of the circular radar. The default RGBA value is 0.6, 0.6, 0.6, 0,7.
The color of the radar. The default RGBA value is 0.0, 0.0, 0.0, 0.7.
Determines whether the radar rotates with the device. This is determined by the roll parameter in drawRadarWithHeading:roll: .
Set this to YES to show all of the cardinal direction labels. Otherwise; NO. The default is YES.
cardinalDirectionOffset |
The amount of pixel separation between a cardinal direction label and the radar image. A negative value will decrease the distance while a postivie value with increase the distance.
@property ( nonatomic, assign) CGFloat cardinalDirectionOffset;
currentLocationImageView |
The image view that represents the the devices current location.
@property ( nonatomic, readonly) UIImageView* currentLocationImageView;
The default image is a white plus sign.
headingColor |
The color of the header circular segment. The default RGBA value is 1.0, 1.0, 1.0, 0.7.
@property ( nonatomic, retain) UIColor* headingColor;
headingImageView |
The image view that contains the image used for the heading.
@property ( nonatomic, readonly) UIImageView* headingImageView;
radarBackgroundImageView |
The background image view of the radar.
@property ( nonatomic, readonly) UIImageView* radarBackgroundImageView;
radarBorderColor |
The border color of the circular radar. The default RGBA value is 0.6, 0.6, 0.6, 0,7.
@property ( nonatomic, retain) UIColor* radarBorderColor;
radarCircleColor |
The color of the radar. The default RGBA value is 0.0, 0.0, 0.0, 0.7.
@property ( nonatomic, retain) UIColor* radarCircleColor;
rotatable |
Determines whether the radar rotates with the device. This is determined by the roll parameter in drawRadarWithHeading:roll:.
@property ( nonatomic, assign) BOOL rotatable;
shouldShowCardinalDirections |
Set this to YES to show all of the cardinal direction labels. Otherwise; NO. The default is YES.
@property ( nonatomic, assign) BOOL shouldShowCardinalDirections;
To hide individual labels, use labelForCardinalDirection.
© SimpleGeo Last Updated: 03/31/2010