# Type-Definitions

The following type definitions are available globally.
- `


  ### [GMSMapViewNavigationLayoutErrorCode](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSMapViewNavigationLayoutErrorCode)


  ` Error codes for errors with domain `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Constants/GMSMapViewNavigationLayoutErrorDomain`.

  #### Declaration

  Swift

      struct GMSMapViewNavigationLayoutErrorCode : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable

  Objective-C

      typedef NSInteger GMSMapViewNavigationLayoutErrorCode

- `


  ### [GMSNavigationButtonKnownType](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSNavigationButtonKnownType)


  ` <br />

  <br />

  > [!WARNING]
  > [Experimental](https://developers.google.com/maps/launch-stages#experimental) feature

  <br />

  <br />

  Identifiers for known buttons.

  Note that more identifiers may be added in future NavSDK releases.

  #### Declaration

  Swift

      struct NavigationButtonKnownType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable

  Objective-C

      typedef int GMSNavigationButtonKnownType

- `


  ### [GMSNavigationPromptView](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSNavigationPromptView)


  ` <br />

  <br />

  > [!WARNING]
  > [Experimental](https://developers.google.com/maps/launch-stages#experimental) feature

  <br />

  <br />

  Typedef for the prompt views passed to the layout delegate.

  Prompt views are rounded on the top corners by default. This may be altered via the
  `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigationRoundedCornerView` protocol.

  #### Declaration

  Swift

      typealias NavigationPromptView = any UIView & NavigationRoundedCornerView

  Objective-C

      typedef UIView<https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigationRoundedCornerView> *GMSNavigationPromptView

- `


  ### [GMSNavigationRouteCompletionHandler](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSNavigationRouteCompletionHandler)


  ` Called when a route from the device's location to the provided destination(s) is found, or fails
  to be found for a reason indicated by the `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigationRouteDescription` and `NSError`.

  @related `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator`

  #### Declaration

  Swift

      typealias GMSNavigationRouteCompletionHandler = ((any NavigationRouteDescription)?, (any Error)?) -> Void

  Objective-C

      typedef void (^GMSNavigationRouteCompletionHandler)(
          id<https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigationRouteDescription> _Nullable, NSError *_Nullable)

  #### Parameters

  |---|---|
  | ` routeDescription ` | The navigation route description containing route status and metadata if available. |
  | ` error ` | An error object if the routing request failed, or `nil` if successful. |

- `


  ### [GMSTermsResponseCallback](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSTermsResponseCallback)


  ` Called when the user accepts or rejects the terms and conditions.

  For versions \>= 5.5.0, `termsAccepted` will always be YES.

  @related `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices`

  #### Declaration

  Swift

      typealias GMSTermsResponseCallback = (Bool) -> Void

  Objective-C

      typedef void (^GMSTermsResponseCallback)(BOOL)

- `


  ### [GMSNavigationTransactionRecorderErrorHandler](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSNavigationTransactionRecorderErrorHandler)


  `

  #### Declaration

  Swift

      typealias GMSNavigationTransactionRecorderErrorHandler = (any Error) -> Void

  Objective-C

      typedef void (^GMSNavigationTransactionRecorderErrorHandler)(NSError *error)

- `


  ### [GMSRouteInfoCallback](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSRouteInfoCallback)


  ` Called when the route information (ETA and distance) to the provided waypoint is calculated.

  #### Declaration

  Swift

      typealias GMSRouteInfoCallback = (https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationRouteInfo?) -> Void

  Objective-C

      typedef void (^GMSRouteInfoCallback)(https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationRouteInfo *_Nullable)

  #### Parameters

  |---|---|
  | ` routeInfo ` | The route information to the given destination. Will be nil if the calculation fails. @related `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator` |

- `


  ### [GMSNavigationTransactionIDErrorHandler](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSNavigationTransactionIDErrorHandler)


  ` Called if setting transaction IDs through the setTransactionIDs fails. Refer documentation for
  the API for more details.

  @related `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator`

  #### Declaration

  Swift

      typealias GMSNavigationTransactionIDErrorHandler = (any Error) -> Void

  Objective-C

      typedef void (^GMSNavigationTransactionIDErrorHandler)(NSError *_Nonnull)

- `


  ### [GMSMapViewPresentReportIncidentPanelErrorCode](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSMapViewPresentReportIncidentPanelErrorCode)


  ` <br />

  <br />

  > [!WARNING]
  > [Experimental](https://developers.google.com/maps/launch-stages#experimental) feature

  <br />

  <br />

  Type used to represent error codes for errors that have the domain
  `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Constants/GMSMapViewPresentReportIncidentPanelErrorDomain`.

  #### Declaration

  Swift

      struct GMSMapViewPresentReportIncidentPanelErrorCode : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable

  Objective-C

      typedef NSInteger GMSMapViewPresentReportIncidentPanelErrorCode

- `


  ### [GMSRouteStatusCallback](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSRouteStatusCallback)


  ` Called when a route from the device's location to the provided destination(s) is found, or fails
  to be found for a reason indicated by the RouteStatus.

  @related `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator`

  #### Declaration

  Swift

      typealias GMSRouteStatusCallback = (https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSRouteStatus) -> Void

  Objective-C

      typedef void (^GMSRouteStatusCallback)(https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSRouteStatus)

- `


  ### [GMSSetDestinationCompletionHandler](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSSetDestinationCompletionHandler)


  ` Called when a route from the device's location to the provided destination(s) is found, or fails
  to be found for a reason indicated by the `routeStatus`.

  @related `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator`

  #### Declaration

  Swift

      typealias GMSSetDestinationCompletionHandler = (https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint?, https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSRouteStatus) -> Void

  Objective-C

      typedef void (^GMSSetDestinationCompletionHandler)(
          https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint *_Nullable, https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSRouteStatus)

  #### Parameters

  |---|---|
  | ` destination ` | The destination waypoint, if available. |
  | ` routeStatus ` | This value will be `.OK` if a route was successfully determined; otherwise, it will indicate the reason for failure. |

- `


  ### [GMSFeatureType](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSFeatureType)


  ` Identifiers for feature types of data-driven styling features.

  #### Declaration

  Swift

      struct FeatureType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable

  Objective-C

      typedef NSString *GMSFeatureType

- `


  ### [GMSReverseGeocodeCallback](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSReverseGeocodeCallback)


  ` Handler that reports a reverse geocoding response, or error.

  @related GMSGeocoder

  #### Declaration

  Swift

      typealias GMSReverseGeocodeCallback = (https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSReverseGeocodeResponse?, (any Error)?) -> Void

  Objective-C

      typedef void (^GMSReverseGeocodeCallback)(https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSReverseGeocodeResponse *_Nullable,
                                                NSError *_Nullable)

- `


  ### [GMSMapPoint](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSMapPoint)


  ` A point on the map. May represent a projected coordinate.

  x is in \[-1, 1\]. The axis direction is normal: y grows towards North, x grows towards East. (0,
  0) is the center of the map.

  See `GMSProject()` and `GMSUnproject()`.

  #### Declaration

  Objective-C

      typedef struct https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Structs/GMSMapPoint https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Structs/GMSMapPoint

- `


  ### [GMSOrientation](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSOrientation)


  ` `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Structs/GMSOrientation` is a tuple of heading and pitch used to control the viewing
  direction of a `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSPanoramaCamera`.

  #### Declaration

  Objective-C

      typedef struct https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Structs/GMSOrientation https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Structs/GMSOrientation

- `


  ### [GMSPanoramaCallback](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSPanoramaCallback)


  ` Callback for when a panorama metadata becomes available.
  If an error occurred, `panorama` is nil and `error` is not nil.
  Otherwise, `panorama` is not nil and `error` is nil.

  @related `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSPanoramaService`

  #### Declaration

  Swift

      typealias GMSPanoramaCallback = (https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSPanorama?, (any Error)?) -> Void

  Objective-C

      typedef void (^GMSPanoramaCallback)(https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSPanorama *_Nullable, NSError *_Nullable)

- `


  ### [GMSVisibleRegion](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSVisibleRegion)


  ` `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Structs/GMSVisibleRegion` contains the four points defining the polygon that is visible in a map's
  camera.

  This polygon can be a trapezoid instead of a rectangle, because a camera can have tilt. If the
  camera is directly over the center of the camera, the shape is rectangular, but if the camera is
  tilted, the shape will appear to be a trapezoid whose smallest side is closest to the point of
  view.

  #### Declaration

  Objective-C

      typedef struct https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Structs/GMSVisibleRegion https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Structs/GMSVisibleRegion

- `


  ### [GMSTileURLConstructor](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSTileURLConstructor)


  ` `GMSTileURLConstructor` is a block taking `x`, `y` and `zoom` and returning an NSURL, or nil to
  indicate no tile for that location.

  @related `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSURLTileLayer`

  #### Declaration

  Swift

      typealias GMSTileURLConstructor = (UInt, UInt, UInt) -> URL?

  Objective-C

      typedef NSURL *_Nullable (^GMSTileURLConstructor)(NSUInteger, NSUInteger,
                                                        NSUInteger)