The city of Portland, Maine, has reached a deal with a man it charged with disorderly conduct for whistling too loud.