0

I am trying to use the HERE Attributes API v8 to get road attribute data. I am using the "in" request parameter to filter the results to a certain bounding box. Here is an example request i am making:

https://smap.hereapi.com/v8/maps/attributes?apiKey={API_KEY}&in=bbox:46.628981,24.525495,46.638937,24.532757&layers=SPEED_LIMITS_FC5

I would like to use pagination with the response data, since if i provide a large bounding box i get a 400 response with message "Search result size exceeded. A maximum of 1000 can be returned. Please restrict search space."

The api provides the following request parameters:

count: The number of geometries in the response. If more geometries satisfy the search/filter criteria, they will be suppressed. It is undefined, which of the matching geometries are returned, unless this parameter is used together with offset, which sorts the results set by geometry id. Parameter can be a single value that applies to all layers, or a comma separated list equal in number to the number of layers specified in layer_id parameter. The maximum number of records supported within a single request can be looked up in the /serviceconfiguration.json endpoint.

offset: To paginate huge responses, this parameter specifies the lowest geometry id to be returned. If geometry ids are not known, then retrieve the first page using zero, and to retrieve subsequent pages then request highest geometry of current page + 1 (it doesn't matter whether this geometry id actually exists or not). Use this parameter together with count. Parameter can be a single value that applies to all layers, or a comma separated list equal in number to the number of layers specified in layer_id parameter.

I tried a request with values for offset and count (eg offset 0 , count 10) and different bounding boxes, but never got a smaller/paginated response. For large bounding boxes, the response is still 400 with "search resule size exceeded."

Has anyone been able to paginate with this API or are the docs inaccurate? Does anyone know if this feature is limited in some regions (I am querying the Saudi Arabia region) ?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.