We use a thermal model with single freeze-out to determine longitudinal polarization of $\Lambda$ hyperons emitted from a hot and rotating hadronic medium. We consider the top RHIC energies and use the model parameters determined in the previous analyses of particle spectra and elliptic flow. Using a direct connection between the spin polarization tensor and thermal vorticity, we reproduce earlier results which indicate a quadrupole structure of the longitudinal component of the polarization three-vector with an opposite sign compared to that found in the experiment. We further use only the spatial components of the thermal vorticity in the laboratory system to define polarization and show that this leads to the correct sign and magnitude of the quadrupole structure. This procedure resembles a non-relativistic connection between the polarization three-vector and vorticity employed in other works. In general, our results bring further evidence that the spin polarization dynamics in heavy-ion collisions may be not directly related to the thermal vorticity. The additional material explains the construction of the hydrodynamicaly consistent gradients of fluid velocity and temperature in thermal models with the help of the perfect-fluid equations of motion.