MGLTextRotationAlignment

enum MGLTextRotationAlignment {}

In combination with MGLSymbolStyleLayer.symbolPlacement, determines the rotation behavior of the individual glyphs forming the text.

Values of this type are used in the MGLSymbolStyleLayer.textRotationAlignment property.

MGLTextRotationAlignmentMap

When symbolPlacement is set to MGLSymbolPlacementPoint, aligns text east-west. When symbolPlacement is set to MGLSymbolPlacementLine or MGLSymbolPlacementLineCenter, aligns text x-axes with the line.

Declaration

Objective-C

MGLTextRotationAlignmentMap

Swift

case map = 0

MGLTextRotationAlignmentViewport

Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of MGLSymbolStyleLayer.symbolPlacement.

Declaration

Objective-C

MGLTextRotationAlignmentViewport

Swift

case viewport = 1

MGLTextRotationAlignmentAuto

When symbolPlacement is set to MGLSymbolPlacementPoint, this is equivalent to MGLTextRotationAlignmentViewport. When symbolPlacement is set to MGLSymbolPlacementLine or MGLSymbolPlacementLineCenter, this is equivalent to MGLTextRotationAlignmentMap.

Declaration

Objective-C

MGLTextRotationAlignmentAuto

Swift

case auto = 2
iOS SDK

SDK JS Reference

On this page