The present article describes a contribution to solve transportation problems with green constraints. The aim is to solve an urban traveling salesman problem where the objective function is the total emitted CO2. We start by adapting ASIF approach for calculating CO2 emissions to the urban logistics problem. Then, we solve it using ant colony optimization metaheuristic. The problem formulation and solving will both work under a web-based mapping platform. The selected problem is a real-world NP-hard transportation problem in the city of Casablanca.