Google maps 没有步骤的googleapi路由
谷歌api路线的一个问题 我想知道是否有可能向google发出请求,只获取完整路径的时间和持续时间,而不接收每个中间步骤 谢谢Google maps 没有步骤的googleapi路由,google-maps,Google Maps,谷歌api路线的一个问题 我想知道是否有可能向google发出请求,只获取完整路径的时间和持续时间,而不接收每个中间步骤 谢谢 http://maps.googleapis.com/maps/api/directions/json?origin=Toronto&destination=Montreal&sensor=false "routes" : [ { "bounds" : { "northeast" : {
http://maps.googleapis.com/maps/api/directions/json?origin=Toronto&destination=Montreal&sensor=false
"routes" : [
{
"bounds" : {
"northeast" : {
"lat" : 45.51014580,
"lng" : -73.55252489999999
},
"southwest" : {
"lat" : 43.65331030,
"lng" : -79.38373319999999
}
},
"copyrights" : "Datos de mapa ©2013 Google",
"legs" : [
{
"distance" : {
"text" : "542 km",
"value" : 542385
},
"duration" : {
"text" : "5h 14 min",
"value" : 18834
},
"end_address" : "Montreal, Quebec, Canadá",
"end_location" : {
"lat" : 45.50857120,
"lng" : -73.55376740
},
"start_address" : "Toronto, Ontario, Canadá",
"start_location" : {
"lat" : 43.65331030,
"lng" : -79.38276750
},
使用
Google Distance Matrix API是一项服务,它为起点和终点矩阵提供旅行距离和时间
目的地。返回的信息基于计算的起点和终点之间的推荐路线
由GoogleMapsAPI创建,并由包含每对的持续时间和距离值的行组成
使用
Google Distance Matrix API是一项服务,它为起点和终点矩阵提供旅行距离和时间
目的地。返回的信息基于计算的起点和终点之间的推荐路线
由GoogleMapsAPI创建,并由包含每对的持续时间和距离值的行组成
(注意参数:起点和终点(复数形式,与api方向不同)
(注意参数:起点和终点(复数形式,与api方向不同)
{
"destination_addresses" : [ "Montreal, QC, Canada" ],
"origin_addresses" : [ "Toronto, ON, Canada" ],
"rows" : [
{
"elements" : [
{
"distance" : {
"text" : "542 km",
"value" : 542384
},
"duration" : {
"text" : "5 hours 14 mins",
"value" : 18835
},
"status" : "OK"
}
]
}
],
"status" : "OK"
}