Contents

init(routeDetails:handler:)

Creates a map panel item with route details.

Declaration

init(routeDetails: [CPRouteDetail], handler: ((CPMapPanelItem, @escaping () -> Void) -> Void)? = nil)

Parameters

  • routeDetails:

    The route detail that helps someone make an informed decision about their journey.

  • 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 route details.

Discussion

For this type of item, the map panel displays up to four route details per item.