sa_vedem
sa_vedem

Reputation: 767

google directions doesn't return any routes when using certain waypoints

I'm using google directions in order to get a route with waypoints. I have the name of the waypoints from an previous call to the Places Api. The problem is that if I make this call:

https://maps.googleapis.com/maps/api/directions/json?origin=46.779704,23.577261&destination=46.564423,23.768673&waypoints=optimize:true|Belvedere,RO|Cheile+Turzii,RO&units=metric&sensor=false

it returns a route. But if Cluj-Napoca National Theatre is added to waypoints and the call looks like this:

https://maps.googleapis.com/maps/api/directions/json?origin=46.779704,23.577261&destination=46.564423,23.768673&waypoints=optimize:true|Belvedere,RO|Cheile+Turzii,RO|Cluj-Napoca+National+Theatre,RO&units=metric&sensor=false

it doesn't work. The response has no results. { "routes" : [], "status" : "ZERO_RESULTS" }

Can anyone please help me understand why isn't this working? Ps: with Cluj-Napoca+International+Airport,RO added instead of Cluj-Napoca+National+Theatre,RO waypoint it works.

Upvotes: 3

Views: 812

Answers (1)

DaJackal
DaJackal

Reputation: 2095

You can try adding the coordinates of the waypoint, instead of adding the name of them.

Upvotes: 5

Related Questions