In emergency scenarios, unmanned aerial vehicles (UAVs) can be deployed to assist localization and communication services for ground terminals. In this paper, we propose a new integrated air-ground networking paradigm that uses dual-functional UAVs to assist the ground networks for improving both communication and localization performance. We investigate the optimization problem of deploying the minimal number of UAVs to satisfy the communication and localization requirements of ground users. The problem has several technical difficulties including the cardinality minimization, the non-convexity of localization performance metric regarding UAV location, and the association between user and communication terminal. To tackle the difficulties, we adopt <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">D</i> -optimality as the localization performance metric, and derive the geometric characteristics of the feasible UAV hovering regions in 2D and 3D based on accurate approximation values. We solve the simplified 2D projection deployment problem by transforming the problem into a minimum hitting set problem, and propose a low-complexity algorithm to solve it. Through numerical simulations, we compare our proposed algorithm with benchmark methods. The number of UAVs required by the proposed algorithm is close to the optimal solution, while other benchmark methods require much more UAVs to accomplish the same task.