機能にアクセスします
このセクションでは、バウンディング ボックスまたはタイルを使用して HERE Data Hub から機能を取得し、機能を反復処理する方法について説明します。
バウンディング ボックスで機能を取得します
バウンディング ボックスを使用して、スペースからフィーチャーを取得できます。
リクエスト
Swagger で試してください
GET /spaces/{spaceId}/bbox?west={westLongitude}&north={northLatitude}&east={eastLongitude}&south={southLatitude}
応答
{
"type": "FeatureCollection",
"features":
[
{
"type": "Feature",
"id": "BfiimUxHjj",
"geometry":
{
"type": "Point",
"coordinates":
[
-2.960847,
53.430828
]
},
"properties":
{
"name": "Anfield",
"@ns:com:here:xyz":
{
"createdAt": 1517504700726,
"updatedAt": 1517504700726,
"space": "x-demospace",
"tags":
[
"football",
"stadium"
]
},
"amenity": "Football Stadium",
"capacity": 54074,
"popupContent": "Home of Liverpool Football Club"
}
}
]
}
タイルで機能を取得します
tileID を使用して、スペースからフィーチャーを取得できます。
リクエスト
Swagger で試してください
GET /spaces/{spaceId}/tile/{type}/{tileId}
応答
{
"type": "FeatureCollection",
"features":
[
{
"type": "Feature",
"id": "BfiimUxHjj",
"geometry":
{
"type": "Point",
"coordinates":
[
-2.960847,
53.430828
]
},
"properties":
{
"name": "Anfield",
"@ns:com:here:xyz":
{
"createdAt": 1517504700726,
"updatedAt": 1517504700726,
"space": "x-demospace",
"tags":
[
"football",
"stadium"
]
},
"amenity": "Football Stadium",
"capacity": 54074,
"popupContent": "Home of Liverpool Football Club"
}
}
]
}
イテレーションのフィーチャーを取得します
このリクエストでは、スペース内の機能を反復処理できます。 応答内のフィーチャーは、 1 つのイテレーション内で 2 回返されないように順序付けされます。 ただし、フィーチャーは同時に修正されるため、すべてのフィーチャーがイテレーションに含まれているとは限りません。
リクエスト
Swagger で試してください
GET /spaces/{spaceId}/iterate
応答
{
"type": "FeatureCollection",
"features":
[
{
"type": "Feature",
"id": "BfiimUxHjj",
"geometry":
{
"type": "Point",
"coordinates":
[
-2.960847,
53.430828
]
},
"properties":
{
"name": "Anfield",
"@ns:com:here:xyz":
{
"createdAt": 1517504700726,
"updatedAt": 1517504700726,
"space": "x-demospace",
"tags":
[
"football",
"stadium"
]
},
"amenity": "Football Stadium",
"capacity": 54074,
"popupContent": "Home of Liverpool Football Club"
}
}
]
}