mapbox / mapbox-sdk-js

A JavaScript client to Mapbox services, supporting Node, browsers, and React Native
Other
718 stars 186 forks source link

Pagination doesn't work correctly for service.listTileset() method #428

Open aparshin opened 3 years ago

aparshin commented 3 years ago

Pagination doesn't work correctly if we add any options to the request, e.g. type or visibility. Here is an example of code (I'm not sure how to create an executable example without exposing my access token):

const service = tilesetsService({accessToken: '<access-token>'})

const response = await service.listTilesets({
    ownerId: '<username>',
    type: 'vector',
    visibility: 'private',
    limit: 5
}).send()

await response.nextPage().send()

The first request works fine, but the second one returns code 400 and message

The requested url's querystring "type" property must equal "raster" or "vector".

Without type, visibility, and limit options, everything works great!