With the ever-increasing growth of electric vehicles (EV)s in the power industry, their significance as a flexible load has increased drastically. On the other hand, uncontrolled charging of these vehicles can cause serious problems in the grid, such as a peak in demand, a decrease in the life expectancy of transformers and as a result, an increase in charging costs of EVs for the EV owners. In this paper, a framework for day-ahead optimal charging of EVs is proposed which through optimization of active and reactive power exchange at each time interval, could prevent the problems mentioned above and at the same time increase the benefit of EV owners and network operators simultaneously. Furthermore, taking into account the effective factors on electrical energy consumption of EVs and the driving pattern of their owners, a route mapping algorithm is developed based on the proposed framework, so as to provide the EV owners with better services. The simulations are carried out using a hybrid interior-point optimization approach, based on traffic and geographic data collected from the city of Kowloon and a standard IEEE 33 bus system is used. The simulation results show that integrating optimal charging of EVs with a route mapping algorithm into the proposed framework can reduce the loss costs of the network during the hours of EVs’ presence in the framework and the selling price of electricity to EV owners by 24.93% and 33.6%, respectively in comparison with the uncontrolled mode. Also, the average life expectancy of power transformers is increased by 2.97% in the optimal charging mode compared to the uncontrolled mode.