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

Known to work example #266

Open
chebourne opened this issue Nov 6, 2019 · 7 comments
Open

Known to work example #266

chebourne opened this issue Nov 6, 2019 · 7 comments

Comments

@chebourne
Copy link

I can load tiles but am having problems with style not being applied - getting a 'Style generation failed' message.

Is there a TileJSON URL and GL Style JSON URL that is known to work so I can test?

@mnboos
Copy link
Collaborator

mnboos commented Nov 8, 2019

The predefined MapTiler (former OpenMapTiles) connections should do that. Did you use your own style?

@chebourne
Copy link
Author

Found this eventually - had to dig into the style definition to get the TileJSON source.

You need to create an account on Maptiler website and then use this page to get the map style:
https://cloud.maptiler.com/

So I came up with something like this for Basic style:
TileJson: https://api.maptiler.com/tiles/v3/tiles.json?key=
StyleJson: https://api.maptiler.com/maps/basic/style.json?key=

Substitute your key in of course.

This worked for me in QGIS but it does not work with my own styles - I have my own TileServer GL and styles.

My own server and styles work fine through the browser.

Is there anything to look out for in the style definition if you are creating them yourself and trying to use in Vector Tiles Reader?

@chebourne
Copy link
Author

Actually, this is not working correctly with Maptiler sources - not all styles are being rendered correctly. Mainly place names e.g.:
image

@mnboos
Copy link
Collaborator

mnboos commented Nov 8, 2019

That's correct and due to the fact, that the style converter is only an incomplete and experimental feature. The Mapbox GL Style specification is to big and fast changing in order for me to maintain a good working parser.

@sfkeller
Copy link

sfkeller commented Nov 8, 2019

Pull requests are welcome :-).

@tomchadwin
Copy link
Contributor

tomchadwin commented Nov 8, 2019

This probably merits its own thread, but I've just started using https://github.com/GeoCat/bridge-style to convert QGIS styles into Mapbox GL JS ones in qgis2web. There are stubbed out placeholders for conversions in the other direction. Perhaps offloading the work you have done so far on style conversion into that lib might be a way forward - since it's a generic style conversion lib, it might attract more contributors.

@tomchadwin
Copy link
Contributor

bridge-style converts between various style formats by using the intermediate geostyler format. So MBGLJS conversion into Geostyler and then into QGIS would go in the following two files:

https://github.com/GeoCat/bridge-style/blob/master/bridgestyle/mapboxgl/togeostyler.py
https://github.com/GeoCat/bridge-style/blob/master/bridgestyle/qgis/fromgeostyler.py

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