# MGLIconRotationAlignment

    enum MGLIconRotationAlignment {}

In combination with `MGLSymbolStyleLayer.symbolPlacement`, determines the rotation behavior of icons.

Values of this type are used in the `MGLSymbolStyleLayer.iconRotationAlignment` property.

- `MGLIconRotationAlignmentMap`

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

  #### Declaration

  Objective-C

      MGLIconRotationAlignmentMap

  Swift

      case map = 0

  View Source on GitHub
- `MGLIconRotationAlignmentViewport`

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

  #### Declaration

  Objective-C

      MGLIconRotationAlignmentViewport

  Swift

      case viewport = 1

  View Source on GitHub
- `MGLIconRotationAlignmentAuto`

  When `symbolPlacement` is set to `MGLSymbolPlacementPoint`, this is equivalent to `MGLIconRotationAlignmentViewport`. When `symbolPlacement` is set to `MGLSymbolPlacementLine` or `MGLSymbolPlacementLineCenter`, this is equivalent to `MGLIconRotationAlignmentMap`.

  #### Declaration

  Objective-C

      MGLIconRotationAlignmentAuto

  Swift

      case auto = 2

  View Source on GitHub