WASHINGTON  A new global survey has found a vast improvement in views of the United States since the election of President Obama. But it also finds broad opposition to one of his crucial policies  sending more troops to Afghanistan  and confirms a drop in confidence in the United States among Israelis.

Mr. Obama, according to the survey by the Pew Global Attitudes Project, enjoys greater confidence among Germans than does Chancellor Angela Merkel, and among the French than President Nicolas Sarkozy. His election in itself, pollsters found, helped restore the United States’ image abroad to levels unseen since the Clinton years.

Improved attitudes toward the United States were most marked in Western Europe, but also evident in Asia, Africa and Latin America and included some predominantly Muslim countries.

In Indonesia, where Mr. Obama spent part of his youth, 73 percent of those polled said his election had directly improved their opinion of the United States.