Initializer

init(contentsOf:)

Initializes and returns a directions request object using the specified URL.

Declaration

init(contentsOf url: URL)

Parameters

url

The URL provided to your app.

Return Value

An initialized directions request object.

Discussion

You should use the isDirectionsRequest(_:) method to verify that the specified URL is of the correct format before calling this method to initialize the object.

See Also

Creating a Directions Request Object

class func isDirectionsRequest(URL) -> Bool

Returns a Boolean indicating whether the specified URL contains a directions request.