The Vehicular ad-hoc network (VANET) is suitable for transmitting information in an intelligent transportation system in the smart city scenarios, but it requires real-time and accurate communications. To achieve effective data transferring, a geographic anchor constrained optimize routing algorithm (GACOR) is proposed, which introduces the global anchor. From a city scenario, relevant Geographic location factors were collected and processed by applying Geographic Information System (GIS) technology and GACOR plans the routing paths according to the global information and avoids the local optimum problem in the transmission processes. It also proposes the ideas of storing a local routing table and by which, some packets can be directly sent to the valid neighbor node without calculation. Simulation results show that GACOR can achieve lower packet loss rate and end-to-end delays compared to greedy perimeter stateless routing (GPSR) and Geographic Source Routing (GSR) for VANET in urban scenarios.