TTMapTrafficDelegate

Objective-C

@protocol TTMapTrafficDelegate <NSObject>

Swift

protocol TTMapTrafficDelegate : NSObjectProtocol

TTMapTrafficDelegate

  • Called when trafic flow is clicked

    Declaration

    Objective-C

    - (BOOL)mapTrafficFlowClicked:
                (NSArray<TTMapTrafficFlowTiles *> *_Nonnull)trafficFlows
                       atPosition:(CLLocationCoordinate2D)position
                           forMap:(TTMapView *_Nonnull)mapView;

    Swift

    optional func mapTrafficFlowClicked(_ trafficFlows: [TTMapTrafficFlowTiles], atPosition position: CLLocationCoordinate2D, forMap mapView: TTMapView) -> Bool

    Parameters

    trafficFlows

    NSArray* at one location can be multiple traffic objects

    position

    CLLocationCoordinate2D

    mapView

    TTMapView

    Return Value

    return true to indicate that event was handled otherwise false

  • Called when traffic incident poi is clicked

    Declaration

    Objective-C

    - (BOOL)mapTrafficIncidentPoiClicked:
                (NSArray<TTMapTrafficIncidentPoi *> *_Nonnull)trafficIncidentPois
                              atPosition:(CLLocationCoordinate2D)position
                                  forMap:(TTMapView *_Nonnull)mapView;

    Swift

    optional func mapTrafficIncidentPoiClicked(_ trafficIncidentPois: [TTMapTrafficIncidentPoi], atPosition position: CLLocationCoordinate2D, forMap mapView: TTMapView) -> Bool

    Parameters

    trafficIncidentPois

    NSArray* at one location can be multiple traffic objects

    position

    CLLocationCoordinate2D

    mapView

    TTMapView

    Return Value

    return true to indicate that event was handled otherwise false

  • Called when traffic incident flow is clicked

    Declaration

    Objective-C

    - (BOOL)mapTrafficIncidentFlowClicked:
                (NSArray<TTMapTrafficIncidentFlow *> *_Nonnull)trafficIncidentFlows
                               atPosition:(CLLocationCoordinate2D)position
                                   forMap:(TTMapView *_Nonnull)mapView;

    Swift

    optional func mapTrafficIncidentFlowClicked(_ trafficIncidentFlows: [TTMapTrafficIncidentFlow], atPosition position: CLLocationCoordinate2D, forMap mapView: TTMapView) -> Bool

    Parameters

    trafficIncidentFlows

    NSArray* at one location can be multiple traffic objects

    position

    CLLocationCoordinate2D

    mapView

    TTMapView

    Return Value

    return true to indicate that event was handled otherwise false

  • Called when traffic incident cluster is clicked

    Declaration

    Objective-C

    - (BOOL)mapTrafficIncidentClusterClicked:
                (TTMapTrafficIncidentCluster *_Nonnull)trafficIncidentCluster
                                  atPosition:(CLLocationCoordinate2D)position
                                      forMap:(TTMapView *_Nonnull)mapView;

    Swift

    optional func mapTrafficIncidentClusterClicked(_ trafficIncidentCluster: TTMapTrafficIncidentCluster, atPosition position: CLLocationCoordinate2D, forMap mapView: TTMapView) -> Bool

    Parameters

    trafficIncidentCluster

    TTMapTrafficIncidentCluster

    position

    CLLocationCoordinate2D

    mapView

    TTMapView

    Return Value

    return true to indicate that event was handled otherwise false