季節閉鎖
avoid[feature]=seasonalClosureパラメーターを使用すると、ユーザーは季節閉鎖を回避するルートを計算できます。
季節閉鎖は特定の種類の制限であり、HEREマップに記載されている閉鎖期間は概算です。この概算の性質上、Routing APIのデフォルトの動作では、マップデータ内のこれらの種類の制限は無視されます。代わりに、Routing APIは交通データを利用して、これらの場所における正確かつ最新の閉鎖情報を提供します。
季節閉鎖を通過するルートには、ルートが閉鎖されている可能性があることをユーザーに通知するinfoレベルの通知が含まれています。道路やフェリーの開通/closed状況を確認するのはユーザーの責任となります。
季節閉鎖通知の例
ユーザーが季節閉鎖を回避するようリクエストしたが、ルートが季節閉鎖中の区間を通過する場合
curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'origin=52.3890,12.4981&'\
'destination=52.3882,12.4982&'\
'via=52.38867,12.498142!passThrough=true&'\
'transportMode=truck&'\
'avoid[features]=seasonalClosure&'\
'departureTime=2025-02-01T12:00:00&'\
'apiKey=YOUR_API_KEY'"notices":[
{
"title":"Violated avoid seasonal closure.",
"code":"violatedAvoidSeasonalClosure",
"severity":"critical",
"details":[
{
"type":"restriction",
"cause":"Route violates seasonal closure.",
"timeDependent":true,
"restrictedTimes":"+(M1){M3}(M11){M2}"
}
]
}
]ユーザーが季節閉鎖の回避をリクエストしなかったので、ルートが季節閉鎖区間を通過する場合
curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'origin=52.3890,12.4981&'\
'destination=52.3882,12.4982&'\
'transportMode=truck&'\
'departureTime=any&'\
'apiKey=YOUR_API_KEY'"notices": [
{
"title": "Route goes through seasonal closure.",
"code": "seasonalClosure",
"severity": "info",
"details": [
{
"type": "restriction",
"cause": "Route goes through a seasonal closure.",
"timeDependent": true
}
]
}
]先月の更新