-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Hello,
I need to show some WMTSs offered by QGIS server on leaflet map. Unfortunately, your module doesn't support QGIS server WMTS. Could you please let me know if there is another solution? or could you please update this module to get usable for QGIS server WMTS.
It is my code:
<script src="https://rawgithub.com/mylen/leaflet.TileLayer.WMTS/master/leaflet-tilelayer-wmts.js"></script>var qgisUrl = 'http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP=C:/Users/mkheyrollahi/Downloads/221103-BBVPlanauskunftServer-v3.qgs';
var ign = new L.TileLayer.WMTS(qgisUrl,
{
layer: 'Bretten',
tilematrixSet: "EPSG:3857",
format: "image/png",
attribution: "attribution",
}
);
map.addLayer(ign);
The error that I get several times during the navigation on my leaflet map is as follows:
When I open the link in the error message, I get this error there:
TILEMATRIX ('EPSG:3857:8') cannot be converted into int
QGIS server WMTS accepts usually just one integer number for tilematrix. Otherwise, it doesn't work.
By the way, the provided WMTS works well with no error on browser and Openlayers environment.
On the other hand, I used this module with the same code, too:
<script src="https://unpkg.com/leaflet-tilelayer-wmts/dist/leaflet-tilelayer-wmts.js"></script>This module is a bit better but not good enough. It shows my WMTS layer partially and randomly on some zoom levels with no logic. The performance is poor. It sometimes shows half of the layer, sometimes the whole layer and sometimes nothing.
It gives this error several times when navigating on the leaflet map:
When I open the link in the error message, I get this error there:
TileCol is unknown
Thanks for your time and consideration.
Best regards,
Mostafa