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

# init(ecoScore:)

Creates additional route information for an eco-score rating.

```
convenience init(ecoScore value: Double)
```

## Parameters

`value`

The eco-score rating from 0.0 to 100.0. Values outside this range will be clamped.
Higher scores indicate more environmentally friendly routes.

## Return Value

A new @c CPRouteDetail instance representing the eco-score

## Discussion

Use this method to display a normalized environmental efficiency score for the route. The score
should be a value between 0.0 and 100.0, where higher values indicate more environmentally
friendly routing options.

\discussion The eco-score can incorporate multiple factors including carbon emissions, fuel
efficiency, traffic congestion impact, terrain characteristics, and route optimization. The system
displays this as a percentage-like value with appropriate visual indicators. Use consistent
calculation methodology across all routes to enable meaningful comparison.
\note The interpretation and calculation methodology of eco-scores may vary by app. Consider
documenting your scoring algorithm in your app’s help or settings, and ensure the score
remains consistent across app updates to maintain user trust and understanding.

---

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)