init(trafficLights:)
Creates additional route information for the number of traffic lights along the route.
Declaration
convenience init(trafficLights: Int)Parameters
- trafficLights:
The number of traffic lights along the route. Common values range from 0 to 50+ for typical urban routes.
Return Value
A new @c CPRouteDetail instance representing the traffic light count
Discussion
Use this method to display the count of traffic signals that will be encountered along the route. This helps users understand potential stop-and-go traffic patterns and estimate realistic travel time.
Traffic light count provides valuable context for route selection, especially in urban areas where signal timing can significantly impact travel time. Routes with fewer traffic lights may offer smoother travel despite similar distances.