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 current session state. The possible state can be referenced from
GMTCMapViewSessionState
.Declaration
Swift
weak optional var delegate: (any GMTCMapViewSessionDelegate)? { get set }
Objective-C
@optional @property (nonatomic, weak, readwrite, nullable) __kindof id<GMTCMapViewSessionDelegate> delegate;
-
Returns the current session state. The possible state can be referenced from
GMTCMapViewSessionState
.Declaration
Swift
var state: GMTCMapViewSessionState { get }
Objective-C
@required @property (nonatomic, readonly) GMTCMapViewSessionState state;
-
Returns the host map view of the current session.
Declaration
Swift
weak var hostMapView: GMTCMapView? { get }
Objective-C
@required @property (nonatomic, weak, readonly, nullable) GMTCMapView *hostMapView;
-
Called by a
GMTCMapView
instance when the session has been added to it.Declaration
Swift
func didAdd(to mapView: GMTCMapView)
Objective-C
- (void)didAddToMapView:(nonnull GMTCMapView *)mapView;
-
Called by a
GMTCMapView
instance when the session has been removed from it.Declaration
Swift
func didRemove(from mapView: GMTCMapView)
Objective-C
- (void)didRemoveFromMapView:(nonnull GMTCMapView *)mapView;