John E. Hartley, 52, assistant director of the D.C. Department of Transportation and the city's chief traffic engineer since 1968, died yesterday at Holy Cross Hospital in Silver Spring after a brief illness.

Mr. Hartley's position as director of traffic engineering and operations gave him great influence over the daily lives and commuting habits of thousands of area residents.

He was involved in efforts to change parking patterns, smooth the flow of traffic on D.C. streets and at intersections and introduce new high intensity street lights to curb crime.

Although Mr. Hartley was known as a man dedicated to his task, he recognized that to an extent his job was a thankless one.

"The biggest gripe I've gotten in my . . . years in the business," he once said, "is 'Why aren't your (traffic) lights synchronized?'"

The fact was, he said, the lights were synchronized well aware, programs that worked in theory sometimes unvoidably broke down in rush-hour conditions.

After serving as a city traffic engineer in Springfield, Ill., and Kansas City, Mo., he joined the District of Columbia government in 1968.

In addition to his wife, Eleanore, survivors include a son, Phillip, and a daughter, Suzanne, all of the home in Lanham, a sister, Mrs. Edward Dean, and his mother, Mary, both of Detroit.