Skip to content

mbtiles files won't upload to Mapbox #46

Description

@aaronblondeau

When I attempt to upload an .mbtiles file created with tile-count-tile to Mapbox I get this error : "vector_layers must be an array of layer objects"

I found that I can get around this by first exporting the mbtiles to a directory with mbutil. The editing the "json" key in metadata.json from

"json": "{\"vector_layers\": [  ],\"tilestats\": {\"layerCount\": 0,\"layers\": []}}", 

to

"json": "{\"vector_layers\":[{\"id\":\"count\",\"description\":\"\",\"minzoom\":10,\"maxzoom\":14,\"fields\":{\"density\":\"Number\"}}],\"tilestats\":{\"layerCount\":0,\"layers\":[]}}"

(I had set specific min and max zooms with tile-count-tile so I made them match in the json)

Then, after re-packing back to a .mbtiles with mbutil, mapbox would accept the upload.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions