init(chargingStationConnection:handler:)
Creates a map panel item with charging connection details.
Declaration
init(chargingStationConnection: CPChargingStationConnection, handler: ((CPMapPanelItem, @escaping () -> Void) -> Void)? = nil)Parameters
- chargingStationConnection:
The details of a charging station.
- 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 charging information.
Discussion
For this type of item, the map panel displays the charging connector type and the supported power and voltage outputs.