Skip to content

mbtiles files won't upload to Mapbox #46

@aaronblondeau

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions