Contents

init(routeChoice:handler:)

Creates a map panel item with one of the route choices available for a trip.

Declaration

init(routeChoice: CPRouteChoice, handler: ((CPMapPanelItem, @escaping () -> Void) -> Void)? = nil)

Parameters

  • routeChoice:

    A route choice for an upcoming trip.

  • handler:

    A closure you use to respond when someone taps or selects the item. The closure takes the map panel item as a parameter and returns no value. Specify nil if you don’t want to respond to interactions with the item.

Return Value

A map panel item initialized with a route choice.

Discussion

For this type of item, the map panel displays the relevant route choice summaries.