ID で機能を取得します
1 つの機能を要求してい
GET /<Base path for the interactive API from the API Lookup Service>/layers/{layerId}/features/{featureId}
Host: <Hostname for the interactive API from the API Lookup Service>
Authorization: Bearer <Authorization Token>
Cache-Control: no-cache
注
代わりに、認可ヘッダーで OAuth ベアラトークン の代わりに API キー を使用することもできます。
レスポンス
{
"type": "Feature",
"id": "{featureId}",
"geometry":
{
"type": "Point",
"coordinates":
[
-2.960847,
53.430828
]
},
"properties":
{
"name": "Anfield",
"@ns:com:here:xyz":
{},
"amenity": "Football Stadium",
"capacity": 54074,
"popupContent": "Home of Liverpool Football Club"
}
}
複数の機能を要求しています
注
要求によって 1 つのフィーチャだけが返された場合や、フィーチャが返されなかった場合でも、複数のフィーチャを要求すると常に FeatureCollection が返されます。
複数の機能を取得する場合は、リクエストが次のようになっている必要があります。
GET /<Base path for the interactive API from the API Lookup Service>/layers/{layerId}/features?id={featureId1},{featureId2},{featureId3}
レスポンス
{
"type": "FeatureCollection",
"features":
[
{
"type": "Feature",
"geometry":
{
"type": "Point",
"coordinates":
[
-2.960847,
53.430828
]
},
"properties":
{
"@ns:com:here:xyz":
{},
"name": "Anfield",
"amenity": "Football Stadium",
"capacity": 54074,
"popupContent": "Home of Liverpool Football Club"
}
}
]
}
注
複数の ID を要求するもう 1 つの方法は、次のとおりです。? id={ featureId1} 、 id={ featureId2} 、 id={ featureId3}
バージョン対応のインタラクティブマップ レイヤー から機能を要求しています
バージョン対応のインタラクティブマップ レイヤー を使用する場合、機能または機能コレクションの「バージョン」または「作成者」を使用してフィルタリングすることで、機能を要求できます。
GET /<Base path for the interactive API from the API Lookup Service>/layers/{layerId}/features/{featureId}?version={versionNumber}&author={author}
Host: <Hostname for the interactive API from the API Lookup Service>
Authorization: Bearer <Authorization Token>
Cache-Control: no-cache
注
値アスタリスク (*) を使用すると、同じ機能の複数のバージョンをロードできます。
例 : /features? id=f1'f2& version= または /features/f1? version=
バージョンが含まれていない場合、応答は機能の最新の状態を返します。
レスポンス
{
"type": "Feature",
"id": "{featureId}",
"geometry":
{
"type": "Point",
"coordinates":
[
-2.960847,
53.430828
]
},
"properties":
{
"@ns:com:here:xyz":
{
"createdAt": 1680007106932,
"updatedAt": 1680007106932,
"version": "{versionNumber}",
"author": "{author}"
},
"name": "Anfield",
"amenity": "Football Stadium",
"capacity": 54074,
"popupContent": "Home of Liverpool Football Club"
}
}