Label styling through Display Rules
iOS v4
Basic Styling
let displayRule = MPMapsIndoors.shared.displayRuleFor(displayRuleType: .main)
displayRule?.labelStyleTextColor = .yellow
displayRule?.labelStyleTextSize = 12
displayRule?.labelStyleTextOpacity = 0.5
displayRule?.labelStyleHaloColor = .red
displayRule?.labelStyleHaloBlur = 10
displayRule?.labelStyleHaloWidth = 5Styling the label text
func styleLabelText(displayRule: MPDisplayRule) {
displayRule.labelStyleTextSize *= 2
displayRule.labelStyleTextColor = .green
displayRule.labelStylePosition = .right
}
Styling the label halo

Styling text and halo

Flat labels



Graphic Labels

Parts of a Graphic Label
Label
Background Image
Content Area
StretchX/StretchY
Showing Graphic Labels
Inserting Custom Graphics
Example






Last updated
Was this helpful?