          auto cur_maneuver = segment.maneuver();
          auto attrs = cur_maneuver.extendedAttributes();
          if (cur_maneuver.isValid() && attrs.contains("mapbox.banner_instructions")) {
            float along_geometry = distance_along_geometry(segment.path(), to_QGeoCoordinate(*last_position));
            float distance = std::max(0.0f, float(segment.distance()) - along_geometry);
            emit distanceChanged(distance);
  
            m_map->setPitch(MAX_PITCH); // TODO: smooth pitching based on maneuver distance
  
            auto banner = attrs["mapbox.banner_instructions"].toList();
            if (banner.size()) {
 
</s> remove             emit instructionsChanged(banner_0, distance < show_at);
 </s> add             emit instructionsChanged(banner_0, distance_to_maneuver < show_at); </s> remove         // Handle transition to next route segment
        auto next_segment = segment.nextRouteSegment();
        if (next_segment.isValid()) {
          auto next_maneuver = next_segment.maneuver();
          if (next_maneuver.isValid()) {
            float next_maneuver_distance = next_maneuver.position().distanceTo(to_QGeoCoordinate(*last_position));
            // Switch to next route segment
            if (next_maneuver_distance < REROUTE_DISTANCE && next_maneuver_distance > last_maneuver_distance) {
 </s> add           // Transition to next route segment
          if (distance_to_maneuver < -MANEUVER_TRANSITION_THRESHOLD) {
            auto next_segment = segment.nextRouteSegment();
            if (next_segment.isValid()) { </s> remove             last_maneuver_distance = next_maneuver_distance;
          }
        } else {
          // Destination reached
          Params().remove("NavDestination");

          // Clear route if driving away from destination
          float d = segment.maneuver().position().distanceTo(to_QGeoCoordinate(*last_position));
          if (d > REROUTE_DISTANCE) {
            clearRoute();
 </s> add  </s> remove         }
 </s> add 
          float distance_to_maneuver = segment.distance() - along_geometry;
          emit distanceChanged(std::max(0.0f, distance_to_maneuver));
          auto cur_maneuver = segment.maneuver();
          auto attrs = cur_maneuver.extendedAttributes();
          if (cur_maneuver.isValid() && attrs.contains("mapbox.banner_instructions")) {
            float along_geometry = distance_along_geometry(segment.path(), to_QGeoCoordinate(*last_position));
          float distance_to_maneuver = segment.distance() - along_geometry;
          emit distanceChanged(std::max(0.0f, distance_to_maneuver));
          float distance_to_maneuver = segment.distance() - along_geometry;
          emit distanceChanged(std::max(0.0f, distance_to_maneuver));
  
            m_map->setPitch(MAX_PITCH); // TODO: smooth pitching based on maneuver distance
  
            auto banner = attrs["mapbox.banner_instructions"].toList();
            if (banner.size()) {
keep keep keep keep replace replace keep keep keep keep keep
 nav: simplify segment transition (#21383) 
selfdrive/ui/qt/maps/map.cc