This is a program to optimize the route between several locations on a map. We get the really road information from Google Map API using JavaScript. Traditionally, the problem is a NP problem and could not find a solution in polynomial time. We applied ant colony algorithms together with PSO to obtain a relative good solution in a short period of time.