An index layer is an index of the catalog data by attributes. You can query the index layer to get the data handles of data that meets your query criteria, and you can then use those data handles to retrieve the corresponding data.
To get data from the index layer:
For instructions, see Create platform client settings.
IndexLayerClientobject with the HERE Resource Name (HRN) of the catalog that contains the layer, layer ID, and platform client settings from step 1.
const indexLayerClient = await new IndexLayerClient() catalogHrn: "CatalogHRN", layerId: "LayerId", settings: olpClientSettings );
getDatamethod with the data model that contains the ID property (also used as the data handle).
You can find the data model in the partition metadata. For instructions, see Get partition metadata from an index layer.
const data = await indexLayerClient.getData(model);
You receive data from the requested partition.
In browser and Node.js, to abort requests before they have completed, you can create the
AbortController object, and then add the
AbortController.signal property to your requests. For more information, see the
const abortController = new AbortController(); const data = await indexLayerClient.getData(model, abortController.signal);