I don't think so.
For Maryland, I think one needs to adhere to the federal transport standard:
TITLE 18 > PART I > CHAPTER 44 > § 926A
§ 926A. Interstate transportation of firearms
Notwithstanding any other provision of any law or any rule or regulation of a State or any political
subdivision thereof, any person who is not otherwise prohibited by this chapter from transporting, shipping,
or receiving a firearm shall be entitled to transport a firearm for any lawful purpose from any place where he
may lawfully possess and carry such firearm to any other place where he may lawfully possess and carry
such firearm if, during such transportation the firearm is unloaded, and neither the firearm nor any
ammunition being transported is readily accessible or is directly accessible from the passenger compartment
of such transporting vehicle: Provided, That in the case of a vehicle without a compartment separate from the
driver’s compartment the firearm or ammunition shall be contained in a locked container other than the glove
compartment or console.
For NJ, the standard is the same... except don't stop anywhere, even for a snack: just keep driving. Once you stop anywhere in NJ, you are no longer passing through.