Vertigo (sensation of room spinning) and anxiety are related, as anxiety and stress can induce vertigo. When you have a fear of heights and look over the edge of a tall building or bridge, then you may experience vertigo and dizziness, which in turn maintains and perpetuates your fear of heights. This is known as vertigo anxiety.
Vertigo anxiety is usually adaptive, as it keeps you from falling off from tall structures. Vertigo anxiety becomes maladaptive when you have intense anxiety and start exhibiting avoidant behaviors.
However, if you have vertigo as a symptom of a medical disorder such as vestibular disease of the inner ear (which helps with balance), then this is not vertigo anxiety; rather, it is vertigo from vestibular dysfunction. This type of vertigo will require medical attention from an ENT (ear nose throat) specialist. Also, vertigo from vestibular dysfunction will occur at other times, in addition to being at the top of a tall building.