GoogleRidesharingConsumer Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTCMapViewDelegate
@protocol GMTCMapViewDelegate <GMSMapViewDelegate>
Delegate for events on GMTCMapView
.
-
Called after the mapVIew initialization completes and the mapView is ready to render a mapView
session.
Declaration
Swift
optional func mapViewDidInitialize(_ mapview: GMTCMapView)
Objective-C
- (void)mapViewDidInitialize:(nonnull GMTCMapView *)mapview;
Parameters
mapview
|
The GMTCMapView that generated the event.
|
-
Called after user tapped on the marker.
Declaration
Swift
optional func mapView(_ mapView: GMSMapView, didTapConsumerMarker mapMarker: GMSMarker, markerType: GMTCMapViewMarkerType) -> Bool
Objective-C
- (BOOL)mapView:(nonnull GMSMapView *)mapView
didTapConsumerMarker:(nonnull GMSMarker *)mapMarker
markerType:(GMTCMapViewMarkerType)markerType;
Parameters
mapView
|
The GMTCMapView that generated the event.
|
mapMarker
|
|
markerType
|
The type of the tapped marker.
|
Return Value
YES if this delegate handled the tap event, which prevents the map from performing its
default selection behavior, and NO if the map should continue with its default selection
behavior.
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."],[[["`GMTCMapViewDelegate` is a protocol that handles events on a `GMTCMapView`."],["The `mapViewDidInitialize:` method is called when the `mapView` initialization is complete and ready for rendering."],["The `mapView:didTapConsumerMarker:markerType:` method is called when a user taps on a marker, providing details about the tapped marker and allowing the delegate to handle the tap event."],["The `mapView:didTapConsumerMarker:markerType:` method returns a boolean value to determine if the tap should carry on with default behavior."]]],[]]