The governing body of any county or city may prohibit by ordinance the hunting, with a firearm, of any game bird or game animal while the hunting is on or within 100 yards of any primary or secondary highway in such county or city and may provide that any violation of the ordinance shall be a Class 3 misdemeanor. In addition, the governing body of any county or city may prohibit by ordinance the trapping of any game animal or furbearer within fifty feet of the shoulder of any primary or secondary highway in the county or city and may provide that any violation of the ordinance shall be a Class 3 misdemeanor. No such ordinance shall prohibit such trapping where the written permission of the landowner is obtained. It shall be the duty of the governing body enacting an ordinance under the provisions of this section to notify the Director by registered mail no later than May 1 of the year in which the ordinance is to take effect. If the governing body fails to make such notice, the ordinance shall be unenforceable.
For the purpose of this section, the terms "hunt" and "trap" shall not include the necessary crossing of highways for the bona fide purpose of going into or leaving a lawful hunting or trapping area.
Va. Code § 29.1-526