fix undefined issue in calculating gmaps url