[Qgis-user] How to apply own styles to custom vector tiles?

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Wed Jun 24 10:06:57 PDT 2020


Hi,

I can add vector tiles into QGIS 3.14 from the WMTS service of the National Land Survey of Finland with the following URL (api-key will change some day)
https://avoin-karttakuva.maanmittauslaitos.fi/vectortiles/taustakartta/wmts/1.0.0/taustakartta/default/v20/WGS84_Pseudo-Mercator/{z}/{y}/{x}.pbf?api-key=1858323a-ea54-4815-be07-fbecc99dcfd5<https://avoin-karttakuva.maanmittauslaitos.fi/vectortiles/taustakartta/wmts/1.0.0/taustakartta/default/v20/WGS84_Pseudo-Mercator/%7bz%7d/%7by%7d/%7bx%7d.pbf?api-key=1858323a-ea54-4815-be07-fbecc99dcfd5>
"Zoom to layer" shows just one point but just zoom in and map looks a bit like a map.

But how could I apply or convert the Mapbox GL styles from URL to be used in QGIS? The style file is available at
https://avoin-karttakuva.maanmittauslaitos.fi/vectortiles/stylejson/v20/backgroundmap.json?TileMatrixSet=WGS84_Pseudo-Mercator&api-key=1858323a-ea54-4815-be07-fbecc99dcfd5
The style file works well in Maputnik.

I installed the Maptiler plugin but I did not discover if it can be used for importing styles written for custom vector tiles or if it is somehow tied to vector tiles delivered by Maptiler. My trials yield just Python errors like this

Traceback (most recent call last):
              File "C:/Users/JRAHKONEN/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis-maptiler-plugin\browser_mapitem.py", line 60, in
              lambda: self._add_custom_to_canvas())
              File "C:/Users/JRAHKONEN/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis-maptiler-plugin\browser_mapitem.py", line 336, in _add_custom_to_canvas
              if self._is_vector_json(json_url):
              File "C:/Users/JRAHKONEN/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis-maptiler-plugin\browser_mapitem.py", line 119, in _is_vector_json
              data_format = json_data['format']
             KeyError: 'format'

-Jukka Rahkonen-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20200624/0dca442c/attachment.html>


More information about the Qgis-user mailing list