GoogleRidesharingConsumer Framework Reference

  • The GMTCMapViewSession protocol manages the state of a map view session, accessible via the state property, which references GMTCMapViewSessionState.

  • The delegate property of the GMTCMapViewSession protocol allows for monitoring the current session state and references GMTCMapViewSessionDelegate.

  • The hostMapView property within the protocol provides access to the map view that is hosting the current session.

  • The protocol includes methods, didAddToMapView: and didRemoveFromMapView:, which are triggered when a session is added to or removed from a GMTCMapView, respectively.

GMTCMapViewSession

@protocol GMTCMapViewSession <NSObject>
@optional
/**
 * Returns the current session state. The possible state can be referenced from
 * `GMTCMapViewSessionState`.
 */
@property(nonatomic, nullable, weak) __kindof id<GMTCMapViewSessionDelegate> delegate;

@required
/**
 * 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;

/** Called by a `GMTCMapView` instance when the session has been added to it. */
- (void)didAddToMapView:(GMTCMapView *)mapView;

/** Called by a `GMTCMapView` instance when the session has been removed from it. */
- (void)didRemoveFromMapView:(GMTCMapView *)mapView;

@end