[Qgis-user] How to apply own styles to custom vector tiles?
Saber Razmjooei
saber.razmjooei at lutraconsulting.co.uk
Thu Jun 25 04:30:44 PDT 2020
Hi Jukka,
Unfortunately, there seems to be an issue with the conversion. I have tried
it with https://github.com/wonder-sk/mapbox2qgis which is the basis for the
Maptiler plugin and our first attempt while adding the native support for
vector tile.
To solve your issue and in general a better way of handling the style
to/from Mapbox, I suggest to resolve this ticket:
https://github.com/qgis/QGIS/issues/37152
If you'd be interested in sponsoring the fix, let us know.
Kind regards
Saber
On Wed, 24 Jun 2020 at 18:07, Rahkonen Jukka (MML) <
jukka.rahkonen at maanmittauslaitos.fi> wrote:
> 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
>
> “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-
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
--
Saber Razmjooei
www.lutraconsulting.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20200625/0d009a59/attachment.html>
More information about the Qgis-user
mailing list