Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MBTiles format #2317

Open
VincentBaillet opened this issue Mar 11, 2022 · 5 comments
Open

MBTiles format #2317

VincentBaillet opened this issue Mar 11, 2022 · 5 comments

Comments

@VincentBaillet
Copy link

VincentBaillet commented Mar 11, 2022

I'm trying to use Tangram using mbtiles files for an offline iOS project. (latest version : 0.17.1)
currently, I have no problem to display the slovakia map provided by @rwrx on a previous post : vector file for slovakia Il works well, it's fast... It's perfect !

Now, i'm trying to make my own mbtiles.
-I used Tilemaker to create maps. This one for example: Vector file for Guadeloupe. This map looks good with the Qgis viewer, but i can't manage to display it with Tangram-ES. The console output does not show any problem. I can zoom and move the map, add markers... but the map is desperately uniformly white.
-I've tried also to download some MBtiles maps from MapTiler, but I have the same problem displaying them.

So it looks like Tangram-ES is able to display some MBtiles files, but have some difficulties with some others. Or maybe there's something i've not fully understood.

My question is: Is there a tool or a process that I have to use in order to create MBtiles that are compatible with Tangram-ES ?

@rwrx
Copy link
Contributor

rwrx commented Mar 12, 2022

Hello, mbtiles file for Slovakia was generated by https://github.com/tilezen/vector-datasource. When you want to use default Mapzen map styles you need to use the schema in which these map styles are written. Vector-datasource is using this scheme to generate mbtiles files.

@VincentBaillet
Copy link
Author

Thank you @rwrx for you answer.
I am now able to get TangramEs mvt individual tiles from https://tile.nextzen.org. But how do you pack them in a mbtiles file ?

@matteblair
Copy link
Member

Hi @VincentBaillet - glad to hear you're making progress with this issue! It looks like The MBTiles spec repo keeps a list of implementations here: https://github.com/mapbox/mbtiles-spec/wiki/Implementations (seems a bit out of date though). mbutil seems like it might do what you need.

If you are having trouble loading specific mbtiles files in Tangram ES, please share any logs or other errors that you encounter.

@VincentBaillet
Copy link
Author

thank you very much @matteblair for your reply. Mb-util is a brilliant tool.

-I'm able to display @rwrx slovakia's map.
-I'm able to create a mbtiles file that is recognized by Tangram-es (tiles are loaded... by tangram-es).
BUT, no map is displayed, and the log shows no error.

So I think the problem is that the scheme of my mbtiles files does not correspond to what the yaml file describes.
The problem is certainly on my side. But i can't find a way to encode a mbtiles file that would be compatible with the client yaml file.
I've spent several days on that issue, trying to understand what's happening (breakpoint... trace...)

Tangram's code is clean and efficient. It is certainly a good solution for what i want to achieve.
Therefore, some explanations/examples are missing about how to create a production pipeline that starts from a map (TileZen, OSM...) and creates a displayable mbtiles (and the corresponding yaml). Such a description/example/clue would really help a newcomer like me to use your brilliant piece of code.

@KingKOl
Copy link

KingKOl commented Jan 31, 2024

Tilemaker生成的mbtiles里面的tile_data结构和tilezen的不一样,所以可视化不了,除非写个工具做个转换,我打印看了下layername差距都挺大的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants