Instance Method

insertRouteData(_:completion:)

Adds route data to the builder.

Declaration

func insertRouteData(_ routeData: [CLLocation], completion: @escaping (Bool, Error?) -> Void)

Parameters

routeData

An array containing one or more location objects.

completion

A block called after the system adds the collection data to the builder. The system passes the block the following parameters:

success

A Boolean value that indicates whether the builder successfully received the route data.

error

An object that describes the error, if an error has occurred; otherwise, nil.

Discussion

Use this method to asynchronously add one or more CLLocation objects to the series. The CLLocation objects may be inserted in any order; the builder sorts them by date when finalizing the route.

See Also