Height functions and the specialization map for families of elliptic curves