{"geocoded_waypoints" : [ {}, {} ],
"routes" : [],
"status" : "ZERO_RESULTS"}
可以帮助我了解问题所在吗?我的请求是否有错误,或者我绕过了google maps api方向的限制?
最佳答案
您是否在目的地上颠倒了经纬度?
通过此链接,它可以工作(我将它们向后翻转):https://maps.googleapis.com/maps/api/directions/json?origin=17.3916642,78.4346606&destination=17.3813395082035,78.4382585808635&%20waypoints=optimize:true|17.3916642,78.4346606|17.3865225743848,78.4374928101897|17.3813395082035,78.4382585808635&sensor=false
编辑
移除后,航路点前有一个%20
(加编码的空格):
https://maps.googleapis.com/maps/api/directions/json?origin=17.3916642,78.4346606&destination=17.3813395082035,78.4382585808635&waypoints=optimize:true%7C17.3916642,78.4346606%7C17.3865225743848,78.4374928101897%7C17.3813395082035,78.4382585808635&sensor=false
关于java - 向Google发送的HTTP请求通过航点映射api方向,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32313319/