Label

public struct Label : Codable

Label holds the properties of smart labels to be set when setting labels to polygons

  • text to display for the label

    Declaration

    Swift

    public var text: String
  • short text to display for the label

    Declaration

    Swift

    public var shortText: String?
  • state text to display for the label

    Declaration

    Swift

    public var stateText: String?
  • size of the text to display for the label

    Declaration

    Swift

    public var textSize: Double?
  • maximum text width

    Declaration

    Swift

    @available(*, deprecated, message: "use appearance instead")
    public var maxTextDivWidth: Double?
  • minimum text width

    Declaration

    Swift

    @available(*, deprecated, message: "use appearance instead")
    public var minTextDivWidth: Double?
  • number of text lines for a label

    Declaration

    Swift

    @available(*, deprecated, message: "use appearance instead")
    public var textLines: Double?
  • color of the label

    Declaration

    Swift

    @available(*, deprecated, message: "use appearance instead")
    public var color: String?
  • active color of the label

    Declaration

    Swift

    @available(*, deprecated, message: "use appearance instead")
    public var activeColor: String?
  • inactive color of the label

    Declaration

    Swift

    @available(*, deprecated, message: "use appearance instead")
    public var inactiveColor: String?
  • marker size of the label

    Declaration

    Swift

    @available(*, deprecated, message: "use appearance instead")
    public var markerSize: Double?
  • rank of the label

    Declaration

    Swift

    public var rank: Double?
  • Construct a MPIOptions.Label object with the given properties

    Declaration

    Swift

    public init(
        text: String,
        shortText: String? = nil,
        stateText: String? = nil,
        textSize: Double? = nil,
        maxTextDivWidth: Double? = nil,
        minTextDivWidth: Double? = nil,
        textLines: Double? = nil,
        color: String? = nil,
        activeColor: String? = nil,
        inactiveColor: String? = nil,
        markerSize: Double? = nil,
        rank: Double? = nil,
        appearance: LabelAppearance? = nil
    )

    Parameters

    text

    set text of the label

    shortText

    set state text of the label

    shortText

    set state text of the label

    textSize

    set text size of the label

    maxTextDivWidth

    set the maximum test width

    minTextDivWidth

    set the minimum text width

    textLines

    set number of text lines

    color

    set color of the label

    activeColor

    set active color of the label

    inactiveColor

    set inactive color of the label

    markerSize

    set the marker size of the label

    rank

    set the rank of the label

    appearance

    set the apppearance of the label