Rawan Rawan - 1 year ago 500
Swift Question

Google Map Direction API Return Zero Results Swift

My App using Google Maps Direction API to draw route between any two positions (origin - direction positions)user pin it.

I used the API like this way:


The problem is sometimes the response return Zero Results, like this :

"geocoded_waypoints": [

"routes": [],

"status": "ZERO_RESULTS"

I searched a lot but no useful results.

Anyone faced this problem?

Could this problem be because I used the free API?

I will be thankful for any help.


Answer Source

If there will be no path then it returns the same.

See this link : Path Information

Hope this helps!


Try to covert Latitude Longitude into address and pass it over the URL and it will solve the issue. CLGeocoder might help you to do the same.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download