If $M$ and $N$ are two $L$-structures, and $f: M \rightarrow N$ is an elementary extension, then given any subset $A$ of $M$, $f$ induces in a natural way a morphism $S^M_n(A) \rightarrow S^N_n(f(A))$ of type spaces which is in fact continuous. Alternatively, $f$ induces a homomorphism between the Lindebaum algebras of $M$ and $N$, which in turns induces, functorially, a morphism of type spaces.
Is there anything known about when such a morphism (of type spaces) is necessarily induced by an elementary extension? I'd be interested in any results along these lines in any setting.