In recent years, the location-based services (LBS) has become a hot-button issue. According to previous experience, Global Positioning System (GPS) and geographic information system (GIS) play an important role for LBS applications. However, GPS cannot provide the correct position when the user is in the GPS-denied environment. Therefore, numerous indoor locating technologies have been developed such as Wireless locating technologies or dead-reckoning algorithm. The dead-reckoning is the better solution without receiving any signal that can prevent the Signal interference and excessive fee. As the smartphone and other mobile devices become popular, people have been enhancing their demands for indoor applications. In this study, we focus on the smartphone-based pedestrian dead-reckoning. It is the most important algorithm that uses accelerometer to detect human pattern of each step and also uses magnetometers to provide orientation data to identify the heading information when the person is walking. This scope of this research includes the step detection, estimating and calibrating step length, developing 3D PDR algorithm and the map-matching algorithm. In the step detection section, the highly robust detection method is implemented so that the numbers of step can be more accurately detected of each person. Then, the comparisons of each length estimation model are presented. To improve the precision of estimating travel distance, the fixed distance calibration is adopted and the error per meter is only a few centimeter after calibration. Based on acceleration and atmospheric pressure information, the identify mechanism can recognize which floor the user is on and demonstrate the navigation information on each digital building plan. Finally, the more exact forward trajectory can be acquired through the map-matching procession with digital building road map. In this paper, outdoor experimental areas chosen are basketball court and playground. Five test subjects took part in the 2D PDR experiment. In indoor experiment, one subject goes up from IF to 6F and goes down from 6F to 1F with taking the elevator or climbing the stair in order to validate the 3D PDR system.