<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPRouteDetail/init(batteryLevel:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPRouteDetail(cm)routeDetailWithBatteryLevel:"
  },
  "title" : "init(batteryLevel:)"
}
-->

# init(batteryLevel:)

Creates additional route information for battery percentage.

```
convenience init(batteryLevel: Double)
```

## Parameters

`batteryLevel`

The battery level as a percentage from 0.0 (empty) to 100.0 (full). Values
outside this range will be clamped.

## Return Value

A new @c CPRouteDetail instance representing the battery level

## Discussion

Use this method to display the estimated battery level upon arrival at the destination for
electric vehicles. Display as a percentage (0.0 to 100.0) to show state of charge.

\discussion Percentage-based battery display is familiar to most users and provides an intuitive
understanding of remaining range. The system formats this as a percentage with appropriate visual
indicators. Values are clamped to the 0.0-100.0 range if necessary.
\note For more technical users or when absolute capacity is more relevant, consider using
@c routeDetailWithKilowattHours: to show energy in kilowatt-hours instead.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)