New law allows counties, cities to ban smoking at beaches, parks