地図フィードバック API 開発者ガイド

道路状況のフィードバック

ユーザーが HERE.com にアクセスし ているときに、ダルムシュタットの Bruchwiesenstra ß e の端にある歩道 (WGS-84 経度 and 緯度 8.656664011955286,49.86079425922911) がないことがわかりました。

HTTP ヘッダーフィールド

地図フィードバック API の POST リクエストには、次の HTTP ヘッダーフィールドが必要です。

オプション 1 : apiKey 認証

Auth-Service-Id: here_app
Auth-Identifier: apikey
Auth-Secret: {YOUR_APIKEY}
Content-Type: application/vnd.here.layerObjectList+json; charset=UTF-8
Content-Disposition: application/vnd.here.layerObjectList+json; charset=UTF-8
Accept: application/vnd.here.layerObjectList+json
Accept-Charset: charset=UTF-8

オプション 2 : APP_ID/APP_CODE 認証 (廃止)

Auth-Service-Id: here_app
Auth-Identifier: {YOUR_APP_ID}
Auth-Secret: {YOUR_APP_CODE}
Content-Type: application/vnd.here.layerObjectList+json; charset=UTF-8
Content-Disposition: application/vnd.here.layerObjectList+json; charset=UTF-8
Accept: application/vnd.here.layerObjectList+json
Accept-Charset: charset=UTF-8

リクエスト

https://maphub.api.here.com/feedback/

POST リクエスト には、次の POST ボディ が必要です。

[{
  "type":"Point",
  "coordinates":[8.656664011955286,49.86079425922911,0],
  "properties":{
  "v": "2.7",
    "appId": "{YOUR_APP_ID}",
    "roadname": "Bruchwiesenstraße",
    "type": "5",
    "details": "There is a foot path missing.",
    "error": 10,
    "isocc": "DEU",
    "languageCode": "deu",
    "speedCat": "8",
    "dir": "0",
    "zoomLevel": 18,
    "pageURL": "https://here.com/?map=8.656025,49.861,18,0,normal"
  }
}]

レスポンス

リクエストに対する応答には、次の内容が含まれます。

  • 送信されたレビジョンを識別するグローバル一意 ID ( GUID )
  • リビジョンのステータスを追跡するための ID
  • フィードバックで送信された情報
  • タイムスタンプおよび layerID 情報
[
  {
    "layerId": "grp|wiki|WIKI_MAP_FEEDBACK",
    "lastUpdateTS": 1418201944918,
    "coordinates": [
      8.656664011955286,
      49.86079425922911,
      0
    ],
    "guid": "354516c9e571332eaa13ae1b3fc344a825dc1d56",
    "id": -19753,
    "type": "Point",
    "createdTS": 1418201944918,
    "properties": {
      "zoomLevel": 18,
      ],
      "type": "5",
      "error": 10,
      "languageCode": "deu",
      "dir": "0",
      "v": "2.7",
      "appId": "{YOUR_APP_ID}",
      "speedCat": "8",
      "isocc": "DEU",
      "details": "There is a foot path missing.",
      "pageURL": "https://here.com/?map=8.656025,49.861,18,0,normal",
      "roadname": "Bruchwiesenstraße"
    }
  }
]

追加のリクエスト機関が続きます。これは、地図で発生したエラーに対する道路状況のフィードバックの例です。 [HTTP Headers] フィールドの値と要求は、前の例で使用したものと同じであるため、これらの値は次の各フィードバック例には表示されません。 これらのリクエストに対する応答情報は、前の例で示した情報と同様に構造化されていますが、それぞれのリクエスト本文の情報の詳細が表示されます。

道路がありません

[{
  "type": "Point",
  "coordinates": [
  -76.99894738197327,
  39.137360312659595,
  0
  ],
  "properties": {
  "appId": "dIJiXIMv56AfJZCvZ3jl",
  "details": "The road does not exist anymore at that location",
  "error": 12,
  "referenceIds": ["18464777"],
  "isocc": "USA",
  "currentValues": {
     "roadname": "Ednor Rd.",
     "languageCode": "eng"
  },
  "v": "2.7"
  }
}]

道路の形が変わった

[{
  "type":Line",
  "coordinates": [
   [-122.48369693756104, 37.83381888486939],
   [-122.48348236083984, 37.83317489144141],
   [-122.49163627624512, 37.832564787218985],
   [-122.49223709106445, 37.83337825839438],
   [-122.49378204345702, 37.83368330777276]
  ],
  "properties": {
  "appId": "dIJiXIMv56AfJZCvZ3jl",
  "details": "The shape of the road has changed",
  "error": 11,
  "referenceIds": ["38464777"],
  "isocc": "USA",
  "currentValues": {
     "roadname": "Braeburn Road",
     "languageCode": "eng",
     "coordinates":[[-122.49163627624512, 37.832564787218985], [-122.49223709106445, 37.83337825839438]]
  },
  "v": "2.7"
  }
}]

道路が交通渋滞に面していない

[{
  "type": "Point",
  "coordinates": [
  -76.99894738197327,
  39.137360312659595,
  0
  ],
  "properties": {
  "appId": "dIJiXIMv56AfJZCvZ3jl",
  "details": "Road is closed for through traffic, Braeburn Road does not go through to Redcoat. The road is truncated by iron fences from street view",
  "error": 11,
  "referenceIds": ["38464777"],
  "isocc": "USA",
  "access": 16,
  "currentValues": {
     "access": 144,
     "roadname": "Braeburn Road"
  },
  "v": "2.7"
  }
}]

ビットフィールドとマスク

ビットフィールドは、個々のビットで指定されたオプションを提供する 10 進数値です。 これにより、値のセットを 1 つの値に結合できます。また、関連するビットをオンまたはオフにすることで、各オプションを個別に制御できます。 アクティブな値は、 1 つの 10 進数値まで合計されます。

例 :

自動車、バス、タクシー、配達、トラック、 および Emergency 。現在のアクセスビットフィールドが 1+2+4+64+256+512 またはビットフィールドの値で 001101000111あることを意味します ( 最下位ビットが残ります ) 。 トラックへのアクセスが制限されたことを報告するには、アクセス値001100000111を変更します ( または、合計時に 64 を残しておくこともできます :1+2+4+256+512) 。

ビットマスクを使用して変更できるのは、個々のオプションのみです。

元の値が不明なビットフィールドに対する個 ...Mask 々の更新については、プロパティで設定されている影響を受けるビットを示すプロパティが提供されます。

簡単に互換性を保つために、マスクが指定されていない場合、またはマスクが 0 の場合は、すべてのビットフィールドが更新されます。

例 :

個々のオプションをオフにするには、問題のビットの値を 0 に設定し、対応するマスクビットを 1 に設定して、値からそのビットのみを変更することを指定する必要があります。 000000000000 そのため、マスクがに設定されている間、アクセスはに設定 000001000000されます。 安全にフォローできるショートカットについては、次のルールで説明します。 オプションをオフにするには、値を 0 に設定し、マスクをオフにする値に設定します ( 例 : 上記の例のように 64) 。 任意のオプションをアクティブ化するには、値とマスクの両方を同じ数値に設定する必要があります(トラックへのアクセスをアクティブ化する場合、このオプションがすでにアクティブになっているかどうかは不明です)。

次の道路固有のプロパティは、ビットフィールド値にリンクされています。

道路ではトラックは利用できません

[{
  "type":"Point",
  "coordinates":[8.656664011955286,49.86079425922911,0],
  "properties": {
    "v":  "2.6",
    "appId": "{YOUR_APP_ID}",
    "error": 11,

    "referenceIds" : ["52391246"],
    "access": 0,
    "accessMask": 64,
    "details": "No trucks allowed."
  }
}]

トラックを公道で走行可能にします

アクセスマスクを使用したフィードバックは次のとおりです。
[{
  "type":"Point",
  "coordinates":[8.656664011955286,49.86079425922911,0],
  "properties": {
    "v":  "2.6",
    "appId": "{YOUR_APP_ID}",
    "error": 11,

    "referenceIds" : ["52391246"],
    "access": 64,
    "accessMask": 64,
    "details": "Enable truck access."
  }
}]

[ 道路 ] を [ 未舗装 ] に設定します

oda およびを使用 odaMask して未舗装道路を設定するフィードバックは、次のとおりです。
[{
  "type":"Point",
  "coordinates":[8.656664011955286,49.86079425922911,0],
  "properties": {
    "v":  "2.6",
    "appId": "{YOUR_APP_ID}",
    "error": 11,

    "referenceIds" : ["52391246"],
    "oda": 0,
    "odaMask": 1,
    "details": "Set road to unpaved."
  }
}]

ランプを指定します

oda ランプ odaMask を指定するためにおよびを使用するフィードバックは、次のとおりです。
[{
  "type":"Point",
  "coordinates":[8.656664011955286,49.86079425922911,0],
  "properties": {
    "v":  "2.6",
    "appId": "{YOUR_APP_ID}",
    "error": 11,

    "referenceIds" : ["52391246"],
    "oda": 8,
    "odaMask": 8,
    "details": "Flag a ramp."
  }
}]

フィードバックステータスの追跡についての詳細 は、「フィードバックステータスの追跡」を参照してください。