GoogleRidesharingConsumer Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
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
-
-
-
Returns the host map view of the current session.
Declaration
Objective-C
@required
@property (nonatomic, weak, readonly, nullable) GMTCMapView *hostMapView;
-
Called by a GMTCMapView
instance when the session has been added to it.
Declaration
Objective-C
- (void)didAddToMapView:(nonnull GMTCMapView *)mapView;
-
Called by a GMTCMapView
instance when the session has been removed from it.
Declaration
Objective-C
- (void)didRemoveFromMapView:(nonnull GMTCMapView *)mapView;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-21 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGMTCMapViewSession\u003c/code\u003e protocol manages the state of a map view session, accessible via the \u003ccode\u003estate\u003c/code\u003e property, which references \u003ccode\u003eGMTCMapViewSessionState\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edelegate\u003c/code\u003e property of the \u003ccode\u003eGMTCMapViewSession\u003c/code\u003e protocol allows for monitoring the current session state and references \u003ccode\u003eGMTCMapViewSessionDelegate\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ehostMapView\u003c/code\u003e property within the protocol provides access to the map view that is hosting the current session.\u003c/p\u003e\n"],["\u003cp\u003eThe protocol includes methods, \u003ccode\u003edidAddToMapView:\u003c/code\u003e and \u003ccode\u003edidRemoveFromMapView:\u003c/code\u003e, which are triggered when a session is added to or removed from a \u003ccode\u003eGMTCMapView\u003c/code\u003e, respectively.\u003c/p\u003e\n"]]],[],null,["GMTCMapViewSession \n\n @protocol GMTCMapViewSession \u003cNSObject\u003e\n @optional\n /**\n * Returns the current session state. The possible state can be referenced from\n * `GMTCMapViewSessionState`.\n */\n @property(nonatomic, nullable, weak) __kindof id\u003c../Protocols/GMTCMapViewSessionDelegate.html\u003e delegate;\n\n @required\n /**\n * Returns the current session state. The possible state can be referenced from\n * `GMTCMapViewSessionState`.\n */\n @property(nonatomic, readonly) ../Enums/GMTCMapViewSessionState.html state;\n\n /** Returns the host map view of the current session. */\n @property(nonatomic, nullable, weak, readonly) ../Classes/GMTCMapView.html *hostMapView;\n\n /** Called by a `GMTCMapView` instance when the session has been added to it. */\n - (void)didAddToMapView:(../Classes/GMTCMapView.html *)mapView;\n\n /** Called by a `GMTCMapView` instance when the session has been removed from it. */\n - (void)didRemoveFromMapView:(../Classes/GMTCMapView.html *)mapView;\n\n @end\n\n- `\n ``\n ``\n `\n\n [delegate](#/c:objc(pl)GMTCMapViewSession(py)delegate)`\n ` \n Returns the current session state. The possible state can be referenced from\n [GMTCMapViewSessionState](../Enums/GMTCMapViewSessionState.html). \n\n Declaration \n Swift \n\n weak optional var delegate: (any ../Protocols/GMTCMapViewSessionDelegate.html)? { get set }\n\n Objective-C \n\n @optional\n @property (nonatomic, weak, readwrite, nullable)\n __kindof id\u003c../Protocols/GMTCMapViewSessionDelegate.html\u003e\n delegate;\n\n- `\n ``\n ``\n `\n\n [state](#/c:objc(pl)GMTCMapViewSession(py)state)`\n ` \n Returns the current session state. The possible state can be referenced from\n [GMTCMapViewSessionState](../Enums/GMTCMapViewSessionState.html). \n\n Declaration \n Swift \n\n var state: ../Enums/GMTCMapViewSessionState.html { get }\n\n Objective-C \n\n @required\n @property (nonatomic, readonly) ../Enums/GMTCMapViewSessionState.html state;\n\n- `\n ``\n ``\n `\n\n [hostMapView](#/c:objc(pl)GMTCMapViewSession(py)hostMapView)`\n ` \n Returns the host map view of the current session. \n\n Declaration \n Swift \n\n weak var hostMapView: ../Classes/GMTCMapView.html? { get }\n\n Objective-C \n\n @required\n @property (nonatomic, weak, readonly, nullable) ../Classes/GMTCMapView.html *hostMapView;\n\n- `\n ``\n ``\n `\n\n [-didAddToMapView:](#/c:objc(pl)GMTCMapViewSession(im)didAddToMapView:)`\n ` \n Called by a [GMTCMapView](../Classes/GMTCMapView.html) instance when the session has been added to it. \n\n Declaration \n Swift \n\n func didAdd(to mapView: ../Classes/GMTCMapView.html)\n\n Objective-C \n\n - (void)didAddToMapView:(nonnull ../Classes/GMTCMapView.html *)mapView;\n\n- `\n ``\n ``\n `\n\n [-didRemoveFromMapView:](#/c:objc(pl)GMTCMapViewSession(im)didRemoveFromMapView:)`\n ` \n Called by a [GMTCMapView](../Classes/GMTCMapView.html) instance when the session has been removed from it. \n\n Declaration \n Swift \n\n func didRemove(from mapView: ../Classes/GMTCMapView.html)\n\n Objective-C \n\n - (void)didRemoveFromMapView:(nonnull ../Classes/GMTCMapView.html *)mapView;"]]