MapViewDelegate
public protocol MapViewDelegate : AnyObject
The MapViewDelegate protocol defines a set of methods that can be implemented to receive
events and updates related to the MapView life cycle.
-
Tells the delegate that the map view is ready to use.
The
mapparameter is an instance ofTomTomMapthat implements:CameraActions,AnnotationsActions,RouteActions,LocationActions,MapActions.Parameters
mapViewThe map view informing the delegate of its readiness.
mapThe
TomTomMapobject, the entry point for map manipulation, such as adding a marker, manipulating the camera position, etc. -
Tells the delegate that a certain map style was loaded, either successfully with the respective
StyleContaineror unsuccessfully with anError.If the
MapViewhas a previously cached style, it will be loaded. If an error is caused by a network connection issues, fetching the style will be retried after the network connection is restored.Declaration
Swift
func mapView(_ mapView: MapView, onStyleLoad result: Result<StyleContainer, Error>)Parameters
mapViewThe map view informing the delegate of its readiness.
resultContains the
StyleContainerwhen the style was successfully loaded or anErrorwhere the style loading operation encounters failure. A failure to load a style can be caused by an invalid API key, invalid style, network connection issues and more issues that will be indicated in theError‘s description.
TomTom SDK for iOS (0.53.1)
MapViewDelegate