Deep learning based localization and mapping has recently attracted great attentions. Instead of crating hand-designed algorithms via exploiting physical models or geometry theory, deep learning based solutions provide an alternative to solve the problem in a data-driven way. Benefited from the ever-increasing amount of data and computational power, these methods are fast evolving into a new area that offers accurate and robust systems to track motion and estimate scene structure for real-world applications. In this work, we provide a comprehensive survey, and propose a new taxonomy on the existing approaches on localization and mapping using deep learning. We also discuss the limitations of current models, and indicate possible future directions. A wide range of topics are covered, from learning odometry estimation, mapping, to global localization and simultaneous localization and mapping (SLAM). We revisit the problem of perceiving self-motion and scene with on-board sensors, and show how to solve it by integrating these modules into a prospective spatial machine intelligence system (SMIS). It is our hope that this work can connect the emerging works from robotics, computer vision and machine learning communities, and serve as a guide for future researchers to know about the possible ways that apply deep learning to tackle the localization and mapping problems.