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
List of all members.
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
- (void) drawGraphic: |
|
(AGSGraphic *) |
graphic |
inContext: |
|
(CGContextRef) |
context |
forEnvelope: |
|
(AGSEnvelope *) |
env |
atResolution: |
|
(double) |
resolution | |
|
|
| | |
- (NSDictionary *) encodeToJSON |
|
|
|
[optional, inherited] |
Encode and return JSON representation for object.
- Returns:
- JSON representation of object.
- Since:
- 1.0
- (BOOL) hitTestGraphic: |
|
(AGSGraphic *) |
graphic |
withEnvelope: |
|
(AGSEnvelope *) |
envelope |
atResolution: |
|
(double) |
resolution | |
|
|
| | |
Called to see if the geometry passes a hit test for this symbol.
- Since:
- 1.8
- (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
Reimplemented in AGSWebMapFeatureCollection.
- (id) initWithTextTemplate: |
|
(NSString*) |
textTemplate |
color: |
|
(UIColor*) |
color | |
|
|
| | |
Initializes a text symbol.
- Since:
- 1.8
- (BOOL) shouldDrawGraphic: |
|
(AGSGraphic *) |
graphic |
forEnvelope: |
|
(AGSEnvelope *) |
envelope |
atResolution: |
|
(double) |
resolution | |
|
|
| | |
Called to see if the symbol should draw for a specific envelope.
- 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
+ (CGPoint) toScreenPointWithX: |
|
(double) |
x |
y: |
|
(double) |
y |
envelope: |
|
(AGSEnvelope *) |
env |
resolution: |
|
(double) |
res | |
|
|
| | |
A method that derived classes can call to help during drawing.
- Since:
- 2.2
Property Documentation
- (CGFloat) angle [read, write, assign] |
The rotation angle (in degrees) of the text. The text is rotated in a counter-clockwise direction by the amount specified.
- 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] |
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
The style of the font.
- Since:
- 1.8
The weight of the font.
- Since:
- 1.8
The horizontal alignment of the text.
- Since:
- 1.8
- (BOOL) readyToDraw [read, write, assign, inherited] |
Property called by the framework. Most symbols should have this set to YES as soon as the symbol is init'ed. If a symbol needs to access a resource asynchronously before it's ready to draw then it should be set to NO initially then YES once it is ready. This is not as efficient as if a symbol is readyToDraw to begin with, however, so custom symbols should only set this to NO initially if absolutely necessary.
- (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
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