TTMapViewDelegate

Objective-C

@protocol TTMapViewDelegate <TTMapViewCameraDelegate, TTMapViewGestureDelegate>

Swift

protocol TTMapViewDelegate : TTMapViewCameraDelegate, TTMapViewGestureDelegate

The TTMapViewDelegate protocol defines a set of optional methods that you can use to receive map-related update messages. Because many map operations require the TTMapView class to load data asynchronously, the map view calls these methods to notify your application when specific operations complete.

  • Tells the delgate that the specified map view is ready to be used.

    Declaration

    Objective-C

    - (void)onMapReady:(TTMapView *_Nonnull)mapView;

    Swift

    optional func onMapReady(_ mapView: TTMapView)

    Parameters

    mapView

    The map view.

  • Called when the map style has failed to load.

    Declaration

    Objective-C

    - (void)didFailedLoadingMap:(TTMapView *_Nonnull)mapView;

    Swift

    optional func didFailedLoadingMap(_ mapView: TTMapView)

    Parameters

    mapView

    The map view.

  • Called when the map is initialized.

    Declaration

    Objective-C

    - (void)didFinishInitializingMap:(TTMapView *_Nonnull)mapView;

    Swift

    optional func didFinishInitializingMap(_ mapView: TTMapView)

    Parameters

    mapView

    The map view.

  • Called when the map has been loaded - including tiles, however in Offline mode when tiles are not load event is not triggered

    Declaration

    Objective-C

    - (void)didFinishLoadingMap:(TTMapView *_Nonnull)mapView;

    Swift

    optional func didFinishLoadingMap(_ mapView: TTMapView)

    Parameters

    mapView

    The map view.

  • Called when the map style has been loaded. This event triggers an OnMapReady callback.

    Declaration

    Objective-C

    - (void)didFinishLoadingStyle:(TTMapView *_Nonnull)mapView;

    Swift

    optional func didFinishLoadingStyle(_ mapView: TTMapView)

    Parameters

    mapView

    The map view.

  • Called when the map frame has been rendered.

    Declaration

    Objective-C

    - (void)didFinishRenderingFrame:(TTMapView *_Nonnull)mapView;

    Swift

    optional func didFinishRenderingFrame(_ mapView: TTMapView)

    Parameters

    mapView

    The map view.

  • Called when the map has been rendered.

    Declaration

    Objective-C

    - (void)didFinishRenderingMap:(TTMapView *_Nonnull)mapView;

    Swift

    optional func didFinishRenderingMap(_ mapView: TTMapView)

    Parameters

    mapView

    The map view.

  • Called when the source for map style has been changed.

    Declaration

    Objective-C

    - (void)didSourceChanged:(TTMapView *_Nonnull)mapView;

    Swift

    optional func didSourceChanged(_ mapView: TTMapView)

    Parameters

    mapView

    The map view.

  • Called just before map start to be loading.

    Declaration

    Objective-C

    - (void)willStartLoadingMap:(TTMapView *_Nonnull)mapView;

    Swift

    optional func willStartLoadingMap(_ mapView: TTMapView)

    Parameters

    mapView

    The map view.

  • Called just before rendering frame.

    Declaration

    Objective-C

    - (void)willStartRenderingFrame:(TTMapView *_Nonnull)mapView;

    Swift

    optional func willStartRenderingFrame(_ mapView: TTMapView)

    Parameters

    mapView

    The map view.

  • Called just before rendering the map.

    Declaration

    Objective-C

    - (void)willStartRenderingMap:(TTMapView *_Nonnull)mapView;

    Swift

    optional func willStartRenderingMap(_ mapView: TTMapView)

    Parameters

    mapView

    The map view.