AGSTextSymbol Class Reference


Description

Instances of this class represent text symbols. Symbols describe how graphics look on the map. Different symbols are used for graphics with different geometry types. Text symbols are used to display text for graphics. The graphics can be based on any type of geometry - point, multipoint, polyline, or polygon.

Since:
1.8
Inheritance diagram for AGSTextSymbol:
AGSSymbol <AGSCoding>

List of all members.

Public Member Functions

(void) - decodeWithJSON:
(NSDictionary *) - encodeToJSON
(id) - initWithJSON:
(id) - initWithTextTemplate:color:
(UIImage *) - swatchForGeometryType:size:

Static Public Member Functions

(AGSTextSymbol *) + textSymbolWithTextTemplate:color:

Properties

CGFloat angle
UIColor * backgroundColor
UIColor * borderLineColor
UIColor * color
AGSTextSymbolFontDecoration fontDecoration
NSString * fontFamily
float fontSize
AGSTextSymbolFontStyle fontStyle
AGSTextSymbolFontWeight fontWeight
AGSTextSymbolHAlignment hAlignment
BOOL rotateAroundOffset
CGFloat shadowBlur
UIColor * shadowColor
CGSize shadowOffset
NSString * textTemplate
AGSTextSymbolVAlignment vAlignment
CGFloat xoffset
CGFloat yoffset

Member Function Documentation

- (void) decodeWithJSON: (NSDictionary *)  json   [optional, inherited]

Decode object from JSON representation.

Parameters:
json The JSON representation of the object to be decoded.
Since:
1.0
- (NSDictionary *) encodeToJSON   [optional, inherited]

Encode and return JSON representation for object.

Returns:
JSON representation of object.
Since:
1.0
- (id) initWithJSON: (NSDictionary *)  json   [optional, inherited]

Initialize and return object from JSON representation.

Parameters:
json The JSON representation of the object to be created.
Returns:
Object decoded from JSON representation.
Since:
1.0
- (id) initWithTextTemplate: (NSString*)  textTemplate
color: (UIColor*)  color 

Initializes a text symbol.

Since:
1.8
- (UIImage *) swatchForGeometryType: (AGSGeometryType geometryType
size: (CGSize)  size 

Returns an image that represents a swatch for a particular geometry type.

Parameters:
geometryType The type of the geometry determines what kind of swatch is drawn.
size Size of the output swatch.
Returns:
UIImage of the drawn swatch.
+ (AGSTextSymbol *) textSymbolWithTextTemplate: (NSString*)  textTemplate
color: (UIColor*)  color 

Returns an autoreleased text symbol.

Since:
1.8

Property Documentation

- (CGFloat) angle [read, write, assign]

The angle of the text symbol.

Since:
1.8
- (UIColor*) backgroundColor [read, write, retain]

The color of the background of the text symbol.

Since:
1.8
- (UIColor*) borderLineColor [read, write, retain]

The outline color of the text.

Since:
1.8
- (UIColor*) color [read, write, retain, inherited]

Symbol color.

Since:
1.0
- (AGSTextSymbolFontDecoration) fontDecoration [read, write, assign]

The decoration on the font.

Since:
1.8
- (NSString*) fontFamily [read, write, retain]

The font family to use for the text.

Since:
1.8
- (float) fontSize [read, write, assign]

The size of the font.

Since:
1.8
- (AGSTextSymbolFontStyle) fontStyle [read, write, assign]

The style of the font.

Since:
1.8
- (AGSTextSymbolFontWeight) fontWeight [read, write, assign]

The weight of the font.

Since:
1.8
- (AGSTextSymbolHAlignment) hAlignment [read, write, assign]

The horizontal alignment of the text.

Since:
1.8
- (BOOL) rotateAroundOffset [read, write, assign]

Specifies whether the symbol should be rotated around its offset location or its center.

Since:
1.8
- (CGFloat) shadowBlur [read, write, assign]

The amount of blur to apply to the shadow.

Since:
1.8
- (UIColor*) shadowColor [read, write, retain]

The color of the shadow.

Since:
1.8
- (CGSize) shadowOffset [read, write, assign]

The offset to apply to the shadow. This is in points.

Since:
1.8
- (NSString*) textTemplate [read, write, retain]

The text template to be applied when drawing a graphic. Tokens of the form ${...} in the textTemplate are replaced at runtime with corresponding values from the graphic's attributes. The final text is then displayed.

For example, consider a graphic which has an attribute STATE_NAME with the value California. For the symbol to draw the attribute's value, you need to set ${STATE_NAME} as the textTemplate. The token ${STATE_NAME} will then be automatically substituted with the value California when the symbol is drawn.

Since:
1.8
- (AGSTextSymbolVAlignment) vAlignment [read, write, assign]

The vertical alignment of the text.

Since:
1.8
- (CGFloat) xoffset [read, write, assign]

The offset on the x-axis in points. Default is 0.

Since:
1.8
- (CGFloat) yoffset [read, write, assign]

The offset on the y-axis in points. Default is 0.

Since:
1.8