-
Identifier for this annotation
Declaration
Swift
public let id: String
-
The geometry backing this annotation
Declaration
Swift
public var geometry: Geometry { get }
-
The point backing this annotation
Declaration
Swift
public var point: Point
-
Properties associated with the annotation
Declaration
Swift
public var userInfo: [String : Any]?
-
Create a point annotation with a
Point
and an optional identifier.Declaration
Swift
public init(id: String = UUID().uuidString, point: Point)
-
Create a point annotation with a coordinate and an optional identifier
Declaration
Swift
public init(id: String = UUID().uuidString, coordinate: CLLocationCoordinate2D)
Parameters
id
Optional identifier for this annotation
coordinate
Coordinate where this annotation should be rendered
-
Part of the icon placed closest to the anchor.
Declaration
Swift
public var iconAnchor: IconAnchor? { get set }
-
Name of image in sprite to use for drawing an image background.
Declaration
Swift
public var iconImage: String? { get set }
-
Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of
icon-size
to obtain the final offset in pixels. When combined withicon-rotate
the offset will be as if the rotated direction was up.Declaration
Swift
public var iconOffset: [Double]? { get set }
-
Rotates the icon clockwise.
Declaration
Swift
public var iconRotate: Double? { get set }
-
Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by
icon-size
. 1 is the original size; 3 triples the size of the image.Declaration
Swift
public var iconSize: Double? { get set }
-
Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When
icon-allow-overlap
ortext-allow-overlap
isfalse
, features with a lower sort key will have priority during placement. Whenicon-allow-overlap
ortext-allow-overlap
is set totrue
, features with a higher sort key will overlap over features with a lower sort key.Declaration
Swift
public var symbolSortKey: Double? { get set }
-
Part of the text placed closest to the anchor.
Declaration
Swift
public var textAnchor: TextAnchor? { get set }
-
Value to use for a text label. If a plain
string
is provided, it will be treated as aformatted
with default/inherited formatting options.Declaration
Swift
public var textField: String? { get set }
-
Text justification options.
Declaration
Swift
public var textJustify: TextJustify? { get set }
-
Text tracking amount.
Declaration
Swift
public var textLetterSpacing: Double? { get set }
-
The maximum line width for text wrapping.
Declaration
Swift
public var textMaxWidth: Double? { get set }
-
Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.
Declaration
Swift
public var textOffset: [Double]? { get set }
-
Radial offset of text, in the direction of the symbol’s anchor. Useful in combination with
text-variable-anchor
, which defaults to using the two-dimensionaltext-offset
if present.Declaration
Swift
public var textRadialOffset: Double? { get set }
-
Rotates the text clockwise.
Declaration
Swift
public var textRotate: Double? { get set }
-
Font size.
Declaration
Swift
public var textSize: Double? { get set }
-
Specifies how to capitalize text, similar to the CSS
text-transform
property.Declaration
Swift
public var textTransform: TextTransform? { get set }
-
The color of the icon. This can only be used with sdf icons.
Declaration
Swift
public var iconColor: StyleColor? { get set }
-
Fade out the halo towards the outside.
Declaration
Swift
public var iconHaloBlur: Double? { get set }
-
The color of the icon’s halo. Icon halos can only be used with SDF icons.
Declaration
Swift
public var iconHaloColor: StyleColor? { get set }
-
Distance of halo to the icon outline.
Declaration
Swift
public var iconHaloWidth: Double? { get set }
-
The opacity at which the icon will be drawn.
Declaration
Swift
public var iconOpacity: Double? { get set }
-
The color with which the text will be drawn.
Declaration
Swift
public var textColor: StyleColor? { get set }
-
The halo’s fadeout distance towards the outside.
Declaration
Swift
public var textHaloBlur: Double? { get set }
-
The color of the text’s halo, which helps it stand out from backgrounds.
Declaration
Swift
public var textHaloColor: StyleColor? { get set }
-
Distance of halo to the font outline. Max text halo width is ¼ of the font-size.
Declaration
Swift
public var textHaloWidth: Double? { get set }
-
The opacity at which the text will be drawn.
Declaration
Swift
public var textOpacity: Double? { get set }