AI-generated Key Takeaways
-
The
GMTCJourneySharingSessionclass manages a journey sharing session, providing properties to access the session's delegate, current state, host map view, and associated trip model. -
The session's
delegateproperty allows for interaction with the session events and updates via theGMTCMapViewSessionDelegateprotocol. -
The
stateproperty reflects the current operational state of the sharing session, with possible states defined inGMTCMapViewSessionState. -
The
hostMapViewproperty provides access to the map view used in the session. -
The
tripModelproperty links the session to a specific trip, represented byGMTCTripModel.
GMTCJourneySharingSession
@interface GMTCJourneySharingSession : NSObject <GMTCMapViewSession>
/** Delegate of the current journey sharing session. */
@property(nonatomic, nullable, weak) id<GMTCMapViewSessionDelegate> delegate;
/**
* Returns the current session state. The possible state can be referenced from
* `GMTCMapViewSessionState`.
*/
@property(nonatomic, readonly) GMTCMapViewSessionState state;
/** Returns the host map view of the current session. */
@property(nonatomic, nullable, weak, readonly) GMTCMapView *hostMapView;
/** Returns the associated trip session. */
@property(nonatomic, readonly) GMTCTripModel *tripModel;
/**
* Initializes the session object.
*
* @param tripModel The target trip request.
*/
- (instancetype)initWithTripModel:(GMTCTripModel *)tripModel;
- (instancetype)init NS_UNAVAILABLE;
@end-
Delegate of the current journey sharing session.
Declaration
Swift
weak var delegate: (any GMTCMapViewSessionDelegate)? { get set }Objective-C
@property (nonatomic, weak, nullable) id<GMTCMapViewSessionDelegate> delegate; -
Returns the current session state. The possible state can be referenced from
GMTCMapViewSessionState.Declaration
Swift
var state: GMTCMapViewSessionState { get }Objective-C
@property (nonatomic, readonly) GMTCMapViewSessionState state; -
Returns the host map view of the current session.
Declaration
Swift
weak var hostMapView: GMTCMapView? { get }Objective-C
@property (nonatomic, weak, readonly, nullable) GMTCMapView *hostMapView; -
Returns the associated trip session.
Declaration
Swift
var tripModel: GMTCTripModel { get }Objective-C
@property (nonatomic, readonly) GMTCTripModel *_Nonnull tripModel; -
Initializes the session object.
Declaration
Swift
init(tripModel: GMTCTripModel)Objective-C
- (nonnull instancetype)initWithTripModel:(nonnull GMTCTripModel *)tripModel;Parameters
tripModelThe target trip request.
-
Unavailable
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE;