With the rapid growth of electric vehicles in the future, large amount of charging stations need to be constructed. Reasonable layout of charging stations has important significance to the investors of charging stations and the clients. This paper introduce an optimal planning model of charging stations, which considers the traffic structure, traffic flow and the cost of customers. Using weighted Voronoi diagram divides the area which need to be planned. Ameliorate the updating mechanism of inertia weight in PSO, and lead the concept of simulated annealing in it. By using weighted Voronoi diagram and PSOSA, the problem of optimal location and capacity of charging stations is solved. Finally, the example analysis verifies the practicality and effectiveness of the planning method and the algorithm.