I used these straight pins from Amazon with my layout. I was using Atlas flex track and Peco turnouts with cork roadbed on top of pink Owens Corning foam insulation boards.
I used Liquid Nails for Projects to glue the foam to plywood and to layer the foam boards. Then I used Elmers glue to lay down the cork roadbed. Then, I used the straight pins to attach the track to the cork. Work great for me!