I'm having a friend wait for me in front of the library.
Literal
Friend [source-に] library [possessive-の] front [at-で] wait-and [receiving favor-もらっています].
~てもらっている layers the benefactive ~てもらう (receiving the favor of someone's action) with the progressive ~ている, producing 'am in the state of having someone wait.' The に marks the person performing the favor — structurally the source of the benefit, not the location.