FUIMapLegendIcon
public struct FUIMapLegendIcon
FUIMapLegendIcon
is a struct to represent an entry in the Map Legend that displays an item with a circular icon.
Example Initialization and Configuration:
var venueItem = FUIMapLegendItem(title: "Self Service")
venueItem.backgroundColor = UIColor.preferredFioriColor(forStyle: .map1)
let venueImage = FUIAttributedImage(image: FUIIconLibrary.map.marker.venue.withRenderingMode(.alwaysTemplate))
venueImage.tintColor = .white
venueItem.icon = FUIMapLegendIcon(glyphImage: venueImage)
var valetItem = FUIMapLegendItem(title: "Valet")
valetItem.backgroundColor = UIColor.preferredFioriColor(forStyle: .map2)
let valetImage = FUIAttributedImage(image: FUIIconLibrary.map.marker.walk.withRenderingMode(.alwaysTemplate))
valetImage.tintColor = .white
valetItem.icon = FUIMapLegendIcon(glyphImage: valetImage)
valetItem.line = FUIMapLegendLine(dashPattern: [10,8], dashPhase: 3.0)
legend.items = [venueItem, valetItem]
-
An initializer to instantiate a
FUIMapLegendIcon
that sets the glyphImage.Declaration
Swift
public init(glyphImage: FUIGlyphImage)