# Formatters

- `MGLClockDirectionFormatter`

  The `MGLClockDirectionFormatter` class provides properly formatted descriptions of headings relative to the user, known as clock positions. For example, a value of `90` may be formatted as “3 o’clock”, depending on the locale.

  Use this class to create localized heading strings when displaying directions relative to the user’s current location and heading. To format a direction irrespective of the user’s orientation, use `MGLCompassDirectionFormatter` instead.

  See more

  #### Declaration

  Objective-C

      @interface MGLClockDirectionFormatter : NSFormatter

  Swift

      class MGLClockDirectionFormatter : Formatter

  View Source on GitHub

- `MGLCompassDirectionFormatter`

  The `MGLCompassDirectionFormatter` class provides properly formatted descriptions of absolute headings. For example, a value of `90` may be formatted as “east”, depending on the locale.

  Use this class to create localized heading strings when displaying directions irrespective of the user’s current location. To format a direction relative to the user’s current location, use `MGLClockDirectionFormatter` instead.

  See more

  #### Declaration

  Objective-C

      @interface MGLCompassDirectionFormatter : NSFormatter

  Swift

      class MGLCompassDirectionFormatter : Formatter

  View Source on GitHub

- `MGLCoordinateFormatter`

  The `MGLCoordinateFormatter` class provides properly formatted descriptions of geographic coordinate pairs. Use this class to create localized coordinate strings when displaying location information to users.

  See more

  #### Declaration

  Objective-C

      @interface MGLCoordinateFormatter : NSFormatter

  Swift

      class MGLCoordinateFormatter : Formatter

  View Source on GitHub

- `MGLDistanceFormatter`

  `MGLDistanceFormatter` implements a formatter object meant to be used for geographic distances. The user’s current locale will be used by default but it can be overriden by changing the locale property of the numberFormatter.

  See more

  #### Declaration

  Objective-C

      @interface MGLDistanceFormatter : NSLengthFormatter

  Swift

      class MGLDistanceFormatter : LengthFormatter

  View Source on GitHub