Overview
This class represents the main view in the Consumer SDK for iOS.
You can use this class to create a customizable map so that your users can use the `consumerMapStylecoordinator` to create custom markers and polylines.
- Note:
- You should instantiate this map via the default constructor [[GMTCMapView alloc] initWithFrame:].
GMTCMapView can be read and modified only from the main thread, similar to GMSMapView and all UIKit objects. Calling these methods from another thread results in an exception or undefined behavior.
Public Member Functions | |
(instancetype) | - initWithFrame: |
Initialization of the GMTCMapView object. | |
(nullable instancetype) | - initWithCoder: |
Initialization with coder. | |
(void) | - resetCamera |
Resets the mapView's camera to the default position based on the current active mapView session(s). | |
(void) | - redrawRidesharingOverlays |
Forces a redraw of all the overlays for ridesharing that were rendered in the current map view. | |
(void) | - showMapViewSession: |
Shows a mapView session on the mapView. | |
(void) | - hideMapViewSession: |
Hides a mapView session on the mapView. | |
(void) | - hideAllMapViewSessions |
Hide all the mapView sessions on the mapView. | |
(NSArray< id < GMTCMapViewSession >> *) | - activeSessions |
Returns all the mapView sessions currently shown on the mapView. | |
Properties | |
id< GMTCMapViewDelegate > | delegate |
Delegate of the map view. | |
GMTCConsumerMapStyleCoordinator * | consumerMapStyleCoordinator |
Maintains customizable UI options for the library's markers, polylines, and polygons. | |
BOOL | allowCameraAutoUpdate |
Allows the map view's camera to auto-update. |
Member Function Documentation
- (instancetype) initWithFrame: | (CGRect) | frame |
Initialization of the GMTCMapView object.
- (nullable instancetype) initWithCoder: | (NSCoder *) | aDecoder |
Initialization with coder.
- Note:
- Use
-initWithFrame
instead.
- (void) resetCamera |
Resets the mapView's camera to the default position based on the current active mapView session(s).
- (void) redrawRidesharingOverlays |
Forces a redraw of all the overlays for ridesharing that were rendered in the current map view.
These overlays include the ridesharing related markers referenced by GMTCCustomizableMarkerType
, the polygons for pickup compounded area and trip routes. You can use this method to redraw overlays cleaned by calling clear
on GMTCMapView.
- Note:
- This API does not restore the overlays added from an application layer.
- (void) showMapViewSession: | (id< GMTCMapViewSession >) | session |
Shows a mapView session on the mapView.
- (void) hideMapViewSession: | (id< GMTCMapViewSession >) | session |
Hides a mapView session on the mapView.
- (void) hideAllMapViewSessions |
Hide all the mapView sessions on the mapView.
- (NSArray<id<GMTCMapViewSession>> *) activeSessions |
Returns all the mapView sessions currently shown on the mapView.
Property Documentation
- (id<GMTCMapViewDelegate>) delegate [read, write, assign] |
Delegate of the map view.
- (GMTCConsumerMapStyleCoordinator*) consumerMapStyleCoordinator [read, assign] |
Maintains customizable UI options for the library's markers, polylines, and polygons.
- (BOOL) allowCameraAutoUpdate [read, write, assign] |
Allows the map view's camera to auto-update.
The default value is YES.