init(travelEstimates:handler:)
Creates a map panel item with travel estimate information.
Declaration
init(travelEstimates: CPTravelEstimates, handler: ((CPMapPanelItem, @escaping () -> Void) -> Void)? = nil)Parameters
- travelEstimates:
The object that provides the remaining distance and time values for a 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
nilif you don’t want to respond to interactions with the item.
Return Value
A map panel item initialized with travel estimates.
Discussion
For this type of item, the map panel displays the expected arrival time, along with the remaining distance and time information.