GoogleNavigation Framework Reference

Type-Definitions

The following type definitions are available globally.

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

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

    @related GMSNavigationServices

    Declaration

    Swift

    typealias GMSTermsResponseCallback = (Bool) -> Void

    Objective-C

    typedef void (^GMSTermsResponseCallback)(BOOL)
  • Declaration

    Swift

    typealias GMSNavigationTransactionRecorderErrorHandler = (any Error) -> Void

    Objective-C

    typedef void (^GMSNavigationTransactionRecorderErrorHandler)(NSError *error)
  • 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 GMSNavigator

    Declaration

    Swift

    typealias GMSRouteStatusCallback = (GMSRouteStatus) -> Void

    Objective-C

    typedef void (^GMSRouteStatusCallback)(GMSRouteStatus)
  • Called when the route information (ETA and distance) to the provided waypoint is calculated.

    Declaration

    Swift

    typealias GMSRouteInfoCallback = (GMSNavigationRouteInfo?) -> Void

    Objective-C

    typedef void (^GMSRouteInfoCallback)(GMSNavigationRouteInfo *_Nullable)

    Parameters

    routeInfo

    The route information to the given destination. Will be nil if the calculation fails. @related GMSNavigator

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

    @related GMSNavigator

    Declaration

    Swift

    typealias GMSNavigationTransactionIDErrorHandler = (any Error) -> Void

    Objective-C

    typedef void (^GMSNavigationTransactionIDErrorHandler)(NSError *_Nonnull)
  • 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
  • Handler that reports a reverse geocoding response, or error.

    @related GMSGeocoder

    Declaration

    Swift

    typealias GMSReverseGeocodeCallback = (GMSReverseGeocodeResponse?, (any Error)?) -> Void

    Objective-C

    typedef void (^GMSReverseGeocodeCallback)(GMSReverseGeocodeResponse *_Nullable,
                                              NSError *_Nullable)
  • 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 GMSMapPoint GMSMapPoint
  • GMSOrientation is a tuple of heading and pitch used to control the viewing direction of a GMSPanoramaCamera.

    Declaration

    Objective-C

    typedef struct GMSOrientation GMSOrientation
  • 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 GMSPanoramaService

    Declaration

    Swift

    typealias GMSPanoramaCallback = (GMSPanorama?, (any Error)?) -> Void

    Objective-C

    typedef void (^GMSPanoramaCallback)(GMSPanorama *_Nullable, NSError *_Nullable)
  • 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 GMSVisibleRegion GMSVisibleRegion
  • GMSTileURLConstructor is a block taking x, y and zoom and returning an NSURL, or nil to indicate no tile for that location.

    @related GMSURLTileLayer

    Declaration

    Swift

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

    Objective-C

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