The solutions to spatial optimal search are complex and important. Since combinatorial optimal problems are computationally difficult, brute-force search can hardly solve the problems. As a result, a novel approach is necessary to deal with them. Particle swarm optimization (PSO) is a new kind of optimal technique, which can solve complex nonlinear spatial optimal problems. This paper demonstrates that PSO solves the spatial optimal search based on GIS under the constraint conditions of population distribution and shortest path. The PSO treats each solution as a particle searching in D-dimensional hyperspace. Different from other optimal problems, the spatial optimal search is in 2-dimensional geographic space, in which each point includes X, Y coordinates. D is equal to 2n. Where n is the number of marketplaces. So the position vector of the particle i is (xi/1, yi/1, xi/2, yi/2, …, xin, yin). Each particle flies over search space and its velocity vector is (vxi/1, vyi/1, vxi/2, vyi/2, …, vxi/n, vyi/n). The particles can adjust their positions and velocities according to the current optimal value p(t) and global optimal value pg/. The work in this paper makes use of the control MapObject2.3 to extract the centroid coordinates, area and population density of each cell in the map of population distribution by means of the computer programming language. It initializes the parameters, computes the fitness value of each particle and finds the current optimal value and global optimal value which adjust the position and velocity of each particle until they satisfy the condition of maximal number of iterations or precision. Finally, it identifies the position of the particle with the global optimal value is the optimal location of the marketplaces. The contents of this paper include: first, this paper introduces the characteristic and research progress about PSO and spatial search. Secondly, the paper elaborates on the implementing procedure and method of spatial optimal search by using PSO and GIS under the constraint condition of population distribution and shortest path. Thirdly, the paper utilizes the 4×4 spatial regions as an example to prove the correctness and effectiveness of the proposed method. Finally, the paper further verifies this method by a case of Fangcun District, Guangzhou. It is concluded that particle swarm optimization is a robust method of solving spatial optimal search under complex conditions.