Hamilton has voted to allow homeless encampments in parks, as legal battles rage over tearing encampments down.