For online 3-d mapping and offline 2-d mapping