LegacyLabel
public struct LegacyLabel : Codable
LegacyLabel
holds the properties of legacy labels to be set when setting legacy labels to polygons
-
Text to display for the legacy label
Declaration
Swift
public var text: String
-
Declaration
Swift
public var height: Double?
-
The amount of space to leave before starting the text (@default 5)
Declaration
Swift
public var margin: Double?
-
Text Color
Declaration
Swift
public var color: String?
-
How big to make the font. Defaults to 12 (@default 12)
Declaration
Swift
public var fontSize: Double?
-
The minimum percentage we can shrink the label to if it won’t fit within the bounds at 100%. If it doesn’t fit at that level, it won’t be created. (@default 0.25)
Declaration
Swift
public var scaleMin: Double?
-
How much to decrement the scale each time it doesn’t fit, so we don’t end up with too many different font sizes on screen at once. If * you are only labeling a few Polygons rather than everything,you can set this and and scaleMin to 0.1 to fit everything except really long names perfectly.(@default 0.25)
Declaration
Swift
public var scaleStep: Double?
-
Construct a
MPIOptions.LegacyLabel
object with the given propertiesDeclaration
Swift
public init( text: String, height: Double? = nil, margin: Double? = nil, color: String? = nil, fontSize: Double? = nil, scaleMin: Double? = nil, scaleStep: Double? = nil)
Parameters
text
set text of the legacy label
height
set custom height of the legacy label
margin
set margin of the llegacy abel
color
set color of the legacy label
fontSize
set the font size of the legacy label
scaleMin
set the minimum scale factor for the legacy label
scaleStep
set the scale step factor for the legacy label’s font