Open chebourne opened 5 years ago
The predefined MapTiler (former OpenMapTiles) connections should do that. Did you use your own style?
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?
Actually, this is not working correctly with Maptiler sources - not all styles are being rendered correctly. Mainly place names e.g.:
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.
Pull requests are welcome :-).
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.
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
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?