Titsjmen
Titsjmen

Reputation: 809

Extracting .mbtiles exported by TileMill using mb-util

I'm using TileMill to export data to .mbtiles format. Then when I'm extracting these mbtiles using mb-util, only tiles are being extracted and no utfgrid files in json format.

I've tried

mb-util ./test.mbtiles ./test

and

mb-util --grid_callback="" ./test.mbtiles ./test

I guess mb-util is not the problem, as when I'm converting a .mbtiles file from the mb-util/test/data directory I do get json grid files aswell. So my guess would be that something is going wrong when exporting from TileMill. I've tried it with my own projects, but also with some default TileMill projects. In both cases PNG's are returned perfectly by mb-util but no UTFGRID.

What am I forgetting?

Upvotes: 0

Views: 1082

Answers (1)

Titsjmen
Titsjmen

Reputation: 809

I got a solution: in TileMill you'll have to define which layer you should use for interaction data, and specify the content to be shown on interactions. Once this is specified you can test in preview mode, if information shows up when you hover over the map it's good. Then you can export as .mbtiles, and mb-util will generate an utfgrid aswell.

Here's some more information: Tilemill project gitub.

Upvotes: 0

Related Questions