Type-Definitions
The following type definitions are available globally.
-
Error codes for errors with domain
GMSMapViewNavigationLayoutErrorDomain.Declaration
Swift
struct GMSMapViewNavigationLayoutErrorCode : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked SendableObjective-C
typedef NSInteger GMSMapViewNavigationLayoutErrorCode -
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 SendableObjective-C
typedef int GMSNavigationButtonKnownType -
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
GMSNavigationRoundedCornerViewprotocol.Declaration
Swift
typealias NavigationPromptView = any UIView & NavigationRoundedCornerViewObjective-C
typedef UIView<GMSNavigationRoundedCornerView> *GMSNavigationPromptView -
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
GMSNavigationRouteDescriptionandNSError.@related
GMSNavigatorDeclaration
Swift
typealias GMSNavigationRouteCompletionHandler = ((any NavigationRouteDescription)?, (any Error)?) -> VoidObjective-C
typedef void (^GMSNavigationRouteCompletionHandler)( id<GMSNavigationRouteDescription> _Nullable, NSError *_Nullable)Parameters
routeDescriptionThe navigation route description containing route status and metadata if available.
errorAn error object if the routing request failed, or
nilif successful. -
Called when the user accepts or rejects the terms and conditions.
For versions >= 5.5.0,
termsAcceptedwill always be YES.@related
GMSNavigationServicesDeclaration
Swift
typealias GMSTermsResponseCallback = (Bool) -> VoidObjective-C
typedef void (^GMSTermsResponseCallback)(BOOL) -
Declaration
Swift
typealias GMSNavigationTransactionRecorderErrorHandler = (any Error) -> VoidObjective-C
typedef void (^GMSNavigationTransactionRecorderErrorHandler)(NSError *error) -
Called when the route information (ETA and distance) to the provided waypoint is calculated.
Declaration
Swift
typealias GMSRouteInfoCallback = (GMSNavigationRouteInfo?) -> VoidObjective-C
typedef void (^GMSRouteInfoCallback)(GMSNavigationRouteInfo *_Nullable)Parameters
routeInfoThe 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
GMSNavigatorDeclaration
Swift
typealias GMSNavigationTransactionIDErrorHandler = (any Error) -> VoidObjective-C
typedef void (^GMSNavigationTransactionIDErrorHandler)(NSError *_Nonnull) -
Type used to represent error codes for errors that have the domain
GMSMapViewPresentReportIncidentPanelErrorDomain.Declaration
Swift
struct GMSMapViewPresentReportIncidentPanelErrorCode : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked SendableObjective-C
typedef NSInteger GMSMapViewPresentReportIncidentPanelErrorCode -
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
GMSNavigatorDeclaration
Swift
typealias GMSRouteStatusCallback = (GMSRouteStatus) -> VoidObjective-C
typedef void (^GMSRouteStatusCallback)(GMSRouteStatus) -
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
GMSNavigatorDeclaration
Swift
typealias GMSSetDestinationCompletionHandler = (GMSNavigationWaypoint?, GMSRouteStatus) -> VoidObjective-C
typedef void (^GMSSetDestinationCompletionHandler)( GMSNavigationWaypoint *_Nullable, GMSRouteStatus)Parameters
destinationThe destination waypoint, if available.
routeStatusThis value will be
.OKif a route was successfully determined; otherwise, it will indicate the reason for failure. -
Identifiers for feature types of data-driven styling features.
Declaration
Swift
struct FeatureType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked SendableObjective-C
typedef NSString *GMSFeatureType -
Handler that reports a reverse geocoding response, or error.
@related GMSGeocoder
Declaration
Swift
typealias GMSReverseGeocodeCallback = (GMSReverseGeocodeResponse?, (any Error)?) -> VoidObjective-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()andGMSUnproject().Declaration
Objective-C
typedef struct GMSMapPoint GMSMapPoint -
GMSOrientationis a tuple of heading and pitch used to control the viewing direction of aGMSPanoramaCamera.Declaration
Objective-C
typedef struct GMSOrientation GMSOrientation -
Callback for when a panorama metadata becomes available. If an error occurred,
panoramais nil anderroris not nil. Otherwise,panoramais not nil anderroris nil.@related
GMSPanoramaServiceDeclaration
Swift
typealias GMSPanoramaCallback = (GMSPanorama?, (any Error)?) -> VoidObjective-C
typedef void (^GMSPanoramaCallback)(GMSPanorama *_Nullable, NSError *_Nullable) -
GMSVisibleRegioncontains 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 -
GMSTileURLConstructoris a block takingx,yandzoomand returning an NSURL, or nil to indicate no tile for that location.@related
GMSURLTileLayerDeclaration
Swift
typealias GMSTileURLConstructor = (UInt, UInt, UInt) -> URL?Objective-C
typedef NSURL *_Nullable (^GMSTileURLConstructor)(NSUInteger, NSUInteger, NSUInteger)