Hi, I'd like to be able to use a custom WMTS (served through a dockerized QGIS server; https://hub.docker.com/r/camptocamp/qgis-server) as background aerial imagery on the ID editor. When I try to set this up, the example given is like that: Example : https://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png But this doesn't look like a WMTS URL. This is the plain http (no https) URL I actually have for a random tile: How can I use it? I already tried to replace the values of TileMatrix, TileRow and TileCol by {z}, {y} and {x} but it doesn't work (I also cannot see any requests arriving on the tile server). Notice; Fig. 1: A tile sample when I browse the previous given URL using Firefox 78.0.1 (64-bit). Thanks. asked 03 Jul '20, 17:28 s-k
showing 5 of 9
show 4 more comments
|
Do the values of "TileMatrix=", "TileCol=" and "TileRow=" correspond to {zoom},{x} and {y}?
Yes, I think it is standardized by the OGC; I've look at the tiles numbers for some regions and it's matching the OSM tiling scheme. I also tried to replace these values in my long WMTS URL but it doesn't work.
Presumably if you just display
http://baseurl/?SERVICE=WMTS&VERSION=1.3.0&REQUEST=GetTile&LAYER=my_custom_layer&STYLE=default&TileMatrixSet=EPSG:3857&TileMatrix=17&TileRow=45220&TileCol=65950&format=image/png
in a browser window you do get a tile?
Indeed;
In Firefox 78.0.1 (64-bit).
And I see the same when using JOSM. (But JOSM uses the
GetCapabilities
to let the user chose the layer before displaying it. Maybe ID should do the same?)Do you use the WMTS host through SSL (https) or plain HTTP?
standard http, as in the URL given in the main post.
So your browser may not show the tiles as of a mixed content warning. See for any errors in the dev console of your browser.
Oh,..! Actually ID itself is trying, by default, to get the tile using https, that's why it doesn't work. Any idea if I can switch ID in a standard "http" mode for querying those background imagery tiles? Otherwise I will have to check for my server to use SSL I guess...
So I would recommend to add SSL to your server. You can use Let's Encrypt to do this without buying a certificate anywhere.