For the purpose of this chapter the several boards of supervisors are hereby clothed with the power and authority, and it is made their duty, to exercise the right of eminent domain in order to procure the right of way for such roads, streets, highways, sea walls, breakwaters, bulkheads, sloping beach, and such other devices as may be adopted for the protection of such highways. They shall have the power to pass all necessary ordinances for the preservation and protection of any such road, sea wall, sloping beach, or other device constructed hereunder, and the violation of such ordinances shall constitute, and be punished as, a misdemeanor.