In recent years, multi-sensor fusion algorithms have been widely used in simultaneous localization and mapping (SLAM) issues. Global navigation satellite systems (GNSS), camera and inertial measurement unit (IMU) is often used in localization framework. Common sensor configuration includes vision-only, vision-inertial, inertial-GNSS and so on. Due to almost every sensor can be vulnerable in a given environment, we still encounter challenges in improving robustness of the simultaneous localization and mapping system. In order to solve this problem to some extent, we propose a new approach to enhance robustness of the system. We design an adaptive localization framework to switch location strategy based on the failure mode of global navigation satellite system. Experiment shows the absolute trajectory error (APE) of proposed method is better comparing with the current mainstream algorithms.