フェリーを通るルートの所要時間を計算します

これは、フェリーを通過するルートの交通情報を含まない移動時間の計算リクエストです。

curl -X GET \
'https://router.hereapi.com/v8/routes?origin=51.13747,1.33148&destination=50.96035,1.905025&return=summary&transportMode=car&apikey={YOUR_API_KEY}'
{
    "routes": [
        {
            "id": "fe1d3ac8-411e-4b47-bd2a-8056484865ce",
            "sections": [
                {
                    "id": "3f104c2d-7ec2-4a63-9e3b-dcf6b9acd251",
                    "type": "vehicle",
                    "departure": {
                        "time": "2021-08-05T10:15:24+01:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 51.1374629,
                                "lng": 1.331544
                            },
                            "originalLocation": {
                                "lat": 51.13747,
                                "lng": 1.33148
                            }
                        }
                    },
                    "arrival": {
                        "time": "2021-08-05T10:24:25+01:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 51.1259,
                                "lng": 1.33574
                            }
                        }
                    },
                    "summary": {
                        "duration": 541,
                        "length": 3898,
                        "baseDuration": 501
                    },
                    "transport": {
                        "mode": "car"
                    }
                },
                {
                    "id": "2239e39b-4eef-4ce0-9988-1c434a1e13a9",
                    "type": "transit",
                    "preActions": [
                        {
                            "action": "board",
                            "duration": 1200
                        }
                    ],
                    "postActions": [
                        {
                            "action": "deboard",
                            "duration": 600
                        }
                    ],
                    "departure": {
                        "time": "2021-08-05T10:24:25+01:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 51.1259,
                                "lng": 1.33574
                            }
                        }
                    },
                    "arrival": {
                        "time": "2021-08-05T12:25:14+02:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 50.96752,
                                "lng": 1.84917
                            }
                        }
                    },
                    "summary": {
                        "duration": 5449,
                        "length": 40565
                    },
                    "notices": [
                        {
                            "title": "No schedule information available.",
                            "code": "noSchedule",
                            "severity": "info"
                        }
                    ],
                    "transport": {
                        "mode": "ferry",
                        "name": "Dover-Calais"
                    }
                },
                {
                    "id": "554714bc-a8c1-406f-8895-d2f81f88722e",
                    "type": "vehicle",
                    "departure": {
                        "time": "2021-08-05T12:25:14+02:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 50.96752,
                                "lng": 1.84917
                            }
                        }
                    },
                    "arrival": {
                        "time": "2021-08-05T12:32:34+02:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 50.9603594,
                                "lng": 1.905304
                            },
                            "originalLocation": {
                                "lat": 50.96035,
                                "lng": 1.905025
                            }
                        }
                    },
                    "summary": {
                        "duration": 440,
                        "length": 5273,
                        "baseDuration": 396
                    },
                    "transport": {
                        "mode": "car"
                    }
                }
            ]
        }
    ]
}

計算

このリクエストの計算の詳細は次のとおりです。 交通渋滞のない期間 = 最初のセクション baseDuration + 2 番目の(フェリー)セクション duration + 3 番目のセクション baseDuration = 501 + 5449 + 396 = 6346 秒 = 1 時間 45 分 46 秒

フェリーの詳細 については、「フェリーを使用する」を参照してください。

」に一致する結果は 件です

    」に一致する結果はありません