If it answers the question Where?, it's an adverb. Like this,
Adverb Test
Q: Where is his hiding place?
A: It's nearby. (Adverb)
It it modifies a noun, then it's an adjective. Like this,
Adjective Test
Q: What kind of hiding place?
A: A hiding place that is nearby. Note, the entire...