mapbox-sdk-py icon indicating copy to clipboard operation
mapbox-sdk-py copied to clipboard

Tilesets API

Open perrygeo opened this issue 8 years ago • 2 comments

Still in preview: https://www.mapbox.com/api-documentation/#tilesets

perrygeo avatar Jan 23 '17 15:01 perrygeo

When updating a Dataset via datasets.update_feature(), I need a way to propagate my changes to Tilesets automatically. Is this something the Tilesets API will allow for? Can't see a way to achieve this at present.

gamb avatar Jun 02 '17 18:06 gamb

@gamb The Tilesets API is read-only and will only provide metadata about the tileset itself. But you can export a Dataset to a Tileset using the Uploader.create method and a custom URI:

service = mapbox.Uploader(access_token=access_token)
uri = "mapbox://datasets/{username}/{dataset_id}".format(
    username=tileset.split('.')[0], dataset_id=dataset_id)
res = service.create(uri, tileset, name=tileset_name)

Hope this helps.

perrygeo avatar Jun 28 '17 16:06 perrygeo