TextSymbol class final
Defines how text is displayed using characteristics such as font, size, color, and position.
To display text in an ArcGISMapViewController or
SceneView, create a TextSymbol.
Specify whether a string or attribute value is displayed by the
TextSymbol.text
. Define the appearance and position of the text using
TextSymbol.color
, TextSymbol.size
, TextSymbol.fontStyle, or
TextSymbol.verticalAlignment
, for example. Position the text by applying
it to a Graphic based on any type of geometry - point, multipoint,
polyline, or polygon. Add the graphic to the GraphicsOverlay.graphics
collection and add the GraphicsOverlay to the ArcGISMapViewController or
SceneView collection of graphics
overlays.
TextSymbol is also used to define the appearance of layer and grid based labels:
- Layers such as FeatureLayer, ArcGISSceneLayer, or DynamicEntityLayer contain label definitions that specify how labels are displayed. You can use LabelDefinition.textSymbol to define a label appearance within a scale range. To display these labels, add a collection of these label definitions to a layer.
- ArcGISMapViewController can display a coordinate system grid with specific label styles at different resolutions. You can define the appearance of these labels using Grid.setTextSymbol.
- Inheritance
-
- Object
- ArcGISSymbol
- MarkerSymbol
- TextSymbol
Constructors
- TextSymbol({String text = '', Color color = const Color(0xFF000000), double size = 8.0, HorizontalAlignment horizontalAlignment = HorizontalAlignment.center, VerticalAlignment verticalAlignment = VerticalAlignment.middle})
-
Creates a text symbol with the given size, text, and color along with the
horizontal and vertical alignment relative to the mid-point of this
symbol.
factory
Properties
- angle ↔ double
-
The angle (in degrees) that the marker symbol is rotated by.
getter/setter pairinherited
- angleAlignment ↔ SymbolAngleAlignment
-
Indicates whether the marker symbol is rotated relative to the screen or
map.
getter/setter pairinherited
- backgroundColor ↔ Color
-
The color for the text symbol background.
getter/setter pair
- color ↔ Color
-
The color for the text symbol.
getter/setter pair
- fontDecoration ↔ FontDecoration
-
The type of font decoration for the text symbol.
getter/setter pair
- fontFamily ↔ String
-
The font family of the text symbol.
getter/setter pair
- fontStyle ↔ ArcGISFontStyle
-
The font style of the text symbol.
getter/setter pair
- fontWeight ↔ ArcGISFontWeight
-
The font weight of the text symbol.
getter/setter pair
- haloColor ↔ Color?
-
The color for the halo around the text symbol.
getter/setter pair
- haloWidth ↔ double
-
The size of the halo around the text symbol in device-independent pixels
(DIPs).
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- horizontalAlignment ↔ HorizontalAlignment
-
The horizontal alignment of the text symbol relative to the symbol's
mid-point location.
getter/setter pair
- kerningEnabled ↔ bool
-
If kerning needs to be enabled. It is disabled by default.
getter/setter pair
- leaderOffsetX ↔ double
-
The callout leader's X offset relative to the marker symbol.
getter/setter pairinherited
- leaderOffsetY ↔ double
-
The callout leader's Y offset relative to the marker symbol.
getter/setter pairinherited
- offsetX ↔ double
-
The offset X of the marker symbol relative to the graphic or feature's
point geometry.
getter/setter pairinherited
- offsetY ↔ double
-
The offset Y of the marker symbol relative to the graphic or feature's
point geometry.
getter/setter pairinherited
- outlineColor ↔ Color?
-
The color for the text symbol outline.
getter/setter pair
- outlineWidth ↔ double
-
The width of the text symbol outline in device-independent pixels (DIPs).
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size ↔ double
-
The font size of the text symbol.
getter/setter pair
- text ↔ String
-
The text of the text symbol.
getter/setter pair
- verticalAlignment ↔ VerticalAlignment
-
The vertical alignment of the text symbol relative to the symbol's
mid-point location.
getter/setter pair
Methods
-
clone(
) → ArcGISSymbol -
Clones the ArcGISSymbol.
inherited
-
createSwatch(
{required double screenScale, double width = 0, double height = 0, Color backgroundColor = Colors.transparent}) → Future< ArcGISImage> -
Creates a swatch image using the provided width, height, screen scale, and
optional background color.
inherited
-
createSwatchWithGeometry(
{required double screenScale, required double width, required double height, required Geometry geometry, Color backgroundColor = Colors.transparent}) → Future< ArcGISImage> -
Creates a swatch image using the provided geometry, width, height, screen
scale, and optional background color.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Returns a JSON representation of this Object in the data type used by jsonDecode.
inherited
-
toJsonString(
) → String -
Returns a JSON representation of this Object as a String.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited