ArcGIS Runtime SDK for iOS
100.15
|
A text symbol.
Instances of this class represent text symbols. Symbols describe how graphics and features look on a map. Text symbols are used to display text for graphics and features. The graphic or feature can be based on any type of geometry - point, multipoint, polyline, or polygon.
AGSMarkerSymbol
, AGSSymbol
Instance Methods | |
(id< AGSCancelable >) | - createSwatchWithBackgroundColor:screen:completion: |
(id< AGSCancelable >) | - createSwatchWithCompletion: |
(id< AGSCancelable >) | - createSwatchWithGeometry:width:height:screen:backgroundColor:completion: |
(nullable id< AGSCancelable >) | - createSwatchWithWidth:height:screen:backgroundColor:completion: |
(instancetype) | - initWithText:color:size:horizontalAlignment:verticalAlignment: |
(BOOL) | - isEqualToSymbol: |
(nullable id) | - toJSON: |
Class Methods | |
(nullable id< AGSJSONSerializable >) | + fromJSON:error: |
(instancetype) | + textSymbol |
(instancetype) | + textSymbolWithText:color:size:horizontalAlignment:verticalAlignment: |
Properties | |
AGSSymbolRotationType rotationType | __deprecated |
float | angle |
AGSSymbolAngleAlignment | angleAlignment |
AGSColor * | backgroundColor |
AGSColor * | color |
AGSFontDecoration | fontDecoration |
NSString * | fontFamily |
AGSFontStyle | fontStyle |
AGSFontWeight | fontWeight |
AGSColor * | haloColor |
CGFloat | haloWidth |
AGSHorizontalAlignment | horizontalAlignment |
BOOL | kerningEnabled |
CGFloat | leaderOffsetX |
CGFloat | leaderOffsetY |
CGFloat | offsetX |
CGFloat | offsetY |
AGSColor * | outlineColor |
CGFloat | outlineWidth |
CGFloat | size |
NSString * | text |
NSDictionary< NSString *, id > * | unknownJSON |
NSDictionary< NSString *, id > * | unsupportedJSON |
AGSVerticalAlignment | verticalAlignment |
- (id<AGSCancelable>) createSwatchWithBackgroundColor: | (nullable AGSColor *) | backgroundColor | |
screen: | (nullable AGSScreen *) | screen | |
completion: | (void(^)(AGSImage *__nullable swatch, NSError *__nullable error)) | completion | |
Creates swatch with provided background color.
backgroundColor | Desired background color of the image. |
screen | Screen that the swatch will be rendered for. If you specify nil then the main screen will be used. |
completion | A block that is invoked when the operation completes. |
- (id<AGSCancelable>) createSwatchWithCompletion: | (void(^)(AGSImage *__nullable swatch, NSError *__nullable error)) | completion |
Creates a swatch with a clear background color. This method uses main screen's scale to determine the size of the image.
completion | block that is invoked when operation completes. |
- (id<AGSCancelable>) createSwatchWithGeometry: | (AGSGeometry *) | geometry | |
width: | (NSInteger) | width | |
height: | (NSInteger) | height | |
screen: | (nullable AGSScreen *) | screen | |
backgroundColor: | (nullable AGSColor *) | backgroundColor | |
completion: | (void(^)(AGSImage *__nullable swatch, NSError *__nullable error)) | completion | |
Creates a swatch using the provided geometry and other parameters. This is the most configurable of the methods to create swatches. You can pass the pixels per inch that you would like the image to be rendered at. This will determine how many pixels are used to render symbols of sizes that are specified in points.
geometry | The geometry of the symbol to be drawn in the swatch image. The specified geometry is in DIPs, with the point {0,0} located at the center of the swatch image. The X-axis increases towards the right side of the swatch image. The Y-axis increases towards the top of the swatch image. For example: when creating a swatch for an AGSMarkerSymbol , specifying a geometry of {10,10} will draw the marker 10 DIPs up and to the right of the center of the swatch. The geometry type (AGSPoint , AGSPolyline , AGSPolygon ) should correspond to the symbol type (AGSMarkerSymbol , AGSLineSymbol , AGSFillSymbol ). The geometry's spatial reference is ignored. |
width | Desired width of the image in pixels. |
height | Desired height of the image in pixels. |
screen | The screen that the swatch will be rendered for. If you specify nil then the main screen will be used. |
backgroundColor | The desired background color of the image. |
completion | A block that is invoked when operation completes. |
- (nullable id<AGSCancelable>) createSwatchWithWidth: | (NSInteger) | width | |
height: | (NSInteger) | height | |
screen: | (nullable AGSScreen *) | screen | |
backgroundColor: | (nullable AGSColor *) | backgroundColor | |
completion: | (void(^)(AGSImage *__nullable swatch, NSError *__nullable error)) | completion | |
|
staticrequiredinherited |
Initializes and returns an object from its JSON representation.
JSONObject | NSDictionary or NSArray containing the JSON. |
error | encountered during the operation, if any. |
- (instancetype) initWithText: | (NSString *) | text | |
color: | (AGSColor *) | color | |
size: | (CGFloat) | size | |
horizontalAlignment: | (AGSHorizontalAlignment) | horizontalAlignment | |
verticalAlignment: | (AGSVerticalAlignment) | verticalAlignment | |
Creates a text symbol with the provided parameters.
size | The size of the symbol in points (not pixels). |
text | The text to be displayed by the symbol. |
color | The color of the text. |
- (BOOL) isEqualToSymbol: | (AGSSymbol *) | other |
Compares this symbol to another for equality.
other | The other symbol to compare this one to. |
YES
if the two symbols are equal, otherwise NO
. + (instancetype) textSymbol |
Creates a text symbol.
+ (instancetype) textSymbolWithText: | (NSString *) | text | |
color: | (AGSColor *) | color | |
size: | (CGFloat) | size | |
horizontalAlignment: | (AGSHorizontalAlignment) | horizontalAlignment | |
verticalAlignment: | (AGSVerticalAlignment) | verticalAlignment | |
Creates a text symbol with the provided parameters.
size | The size of the symbol in points (not pixels). |
text | The text to be displayed by the symbol. |
color | The color of the text. |
|
requiredinherited |
Returns JSON representation for this object.
error | encountered during the operation, if any. |
NSDictionary
or NSArray
containing the JSON. Reimplemented in AGSPortalItem.
|
readwritenonatomicassigninherited |
The rotation type of the marker symbol.
The default value is AGSSymbolRotationTypeArithmetic
. This property is deprecated in release 100.5.
angle
property. Provided by category AGSMarkerSymbol(AGSDeprecated).
|
readwritenonatomicassigninherited |
The angle (in degrees) of the marker symbol.
|
readwritenonatomicassigninherited |
Specifies whether the symbol should rotate with the map/scene or stay at the same angle with regards to the screen. Default is AGSSymbolAngleAlignmentScreen
which keeps it aligned with the screen. Only supported for graphics overlays when AGSGraphicsOverlay::renderingMode
is AGSGraphicsRenderingModeDynamic
, and for feature layers when AGSFeatureLayer::renderingMode
is AGSFeatureRenderingModeDynamic
|
readwritenonatomicstrong |
Background color for the text.
|
readwritenonatomicstrong |
Color of the text.
|
readwritenonatomicassign |
Font decoration for the text.
|
readwritenonatomiccopy |
Font family for the text.
|
readwritenonatomicassign |
Font style for the text.
|
readwritenonatomicassign |
Font weight for the text.
|
readwritenonatomicstrong |
|
readwritenonatomicassign |
|
readwritenonatomicassign |
Horizontal alignment of the text.
|
readwritenonatomicassign |
Indicates whether or not kerning should be applied to the text. Kerning affects spacing of two particular characters to correct for visually uneven spacing.
|
readwritenonatomicassigninherited |
Specifies how to position a callout's leader in relation to the symbol (for example, when a user taps on the map to display a callout for the feature or graphic). Default value is 0 and the callout's leader is positioned at the horizontal center of the symbol. The values specified here are interpreted in a cartesian coordinate system and in points (not pixels). Thus, a value of -5 will offset the callout's leader left on the x-axis by 5 points
|
readwritenonatomicassigninherited |
Specifies how to position a callout's leader in relation to the symbol (for example, when a user taps on the map to display a callout for the feature or graphic). Default value is 0 and the callout's leader is positioned at the vertical center of the symbol. The values specified here are interpreted in a cartesian coordinate system and in points (not pixels). Thus, a value of -5 will offset the callout's leader down on the y-axis by 5 points
|
readwritenonatomicassigninherited |
Specifies how to position the symbol in relation to the graphic or feature's point geometry. This is useful when the marker needs to be offset to properly coincide with a location on the map.
Default value is 0 and the symbol is centered horizontally on the point geometry. The values specified are interpreted in a cartesian coordinate system. Thus, a value of -5 will shift the marker left by 5 points on the x-axis.
For example, consider an AGSPictureMarkerSymbol
using the image of a pushpin. By default, the center of the image will be used as the anchor to center the image at the map location. However, if you wanted the needle of the pushpin to end at the map location, you would need to offset the image appropriately to make the needle's end coincide with the map location.
|
readwritenonatomicassigninherited |
Specifies how to position the symbol in relation to the graphic or feature's point geometry. This is useful when the marker needs to be offset to properly coincide with a location on the map.
Default value is 0 and the symbol is centered vertically on the point geometry. The values specified are interpreted in a cartesian coordinate system. Thus, a value of -5 will shift the marker down by 5 points on the y-axis.
For example, consider an AGSPictureMarkerSymbol
using the image of a pushpin. By default, the center of the image will be used as the anchor to center the image at the map location. However, if you wanted the needle of the pushpin to end at the map location, you would need to offset the image appropriately to make the needle's end coincide with the map location.
|
readwritenonatomicstrong |
|
readwritenonatomicassign |
|
readwritenonatomicassign |
Size of the text.
|
readwritenonatomiccopy |
Text to display.
|
readrequirednonatomiccopyinherited |
A dictionary of values that was in the source JSON but was unparsed by API.
NSDictionary
containing the unknown JSON.
|
readnonatomiccopyinherited |
A dictionary of values that are supported by the REST API, but not exposed through the SDK API.
NSDictionary
containing the unsupported JSON.
|
readwritenonatomicassign |
Vertical alignment of the text.