'Getting duplicate routes when using the Google Directions API

I am using Google Directions API to get routes between two points.

I am requesting results using this url:

https://maps.googleapis.com/maps/api/directions/json?origin=[lat],[long]&destination=[lat],[long]&mode=driving&alternatives=true&departure_time=now&key=[myKEY]

But I am having a problem of always getting a duplicate route.

For example, if I got 3 routes always one of them is duplicated.

This does not happen if I removed departure_time=now, but I need to get the route's traffic status, so I can not remove it.

Any idea what is the wrong here?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source