TextStyle
public struct TextStyle
Represents the style used to display safety locations markers.
Important
This stylization API is intended to be used for only the turn-by-turn navigation.Important
This is a Public Preview API. It may be changed or removed at any time.-
Initializes a new
SafetyLocationStyle/TextStyle
instance with the specified values.Declaration
Parameters
fontURI
The font of the speed limit text on the marker. By default,
fontURI
is used.color
Text color. By default,
color
is used.size
Text size (in point units). By default,
size
is used.offset
Double
describing the offset that will be used to position the label in theTomTomSDKMapDisplay/Marker
. Depending on the anchoring, the point of the label that is anchored varies: - If anchoring is left, the anchor point is the baseline-leftmost pixel of the label. - If anchoring is center, the anchor point is the baseline-center pixel of the label. - If anchoring is right, the anchor point is the baseline-rightmost pixel of the label.By default, ``Defaults/offset`` is used.
anchoring
TomTomSDKMapsDisplay/TextAnchoring
determining how the label is positioned in theTomTomSDKMapDisplay/Marker
. By default,anchoring
is used.
-
The font of the speed limit text on the marker.
Declaration
Swift
public let fontURI: String
-
Text color.
Declaration
Swift
public var color: UIColor
-
Text size (in point units).
Declaration
Swift
public var size: Double
-
Describing the offset that will be used to position the label in the
TomTomSDKMapDisplay/Marker
. Depending on the anchoring, the point of the label that is anchored varies:- If anchoring is left, the anchor point is the baseline-leftmost pixel of the label.
- If anchoring is center, the anchor point is the baseline-center pixel of the label.
- If anchoring is right, the anchor point is the baseline-rightmost pixel of the label.
Declaration
Swift
public var offset: MarkerLabelOptions.TextOffset
-
The anchoring that will be used to position the speed limit text. Default value is center.
Declaration
Swift
public var anchoring: TextAnchoring