MapViewDelegate

public protocol MapViewDelegate : AnyObject

Set delegate property to receive updates you when MapView is ready to be used.

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

    The map parameter is an instance of TomTomMap that implements: CameraActions, AnnotationsActions, RouteActions, LocationActions, MapActions.

    Declaration

    Swift

    func mapView(_ mapView: MapView, onMapReady map: TomTomMap)

    Parameters

    mapView

    The map view object.

    map

    The map object. Entry point for map manipulation.

  • Tells the delegate that the specified map view has loaded with a task result. If MapView has previously cached style it will be loaded. If error is caused by the network connection issues. Fetching style will be retried after network is back.

    Declaration

    Swift

    func mapView(_ mapView: MapView, onStyleLoad result: Result<StyleContainer, Error>)

    Parameters

    mapView

    The map view object.

    result

    Contains the StyleContainer or an error object.