alexandre-melard / leaflet.TileLayer.WMTS

Add WMTS layering for leaflet
Other
78 stars 84 forks source link

missing TileMatrixSet in TileMatrix #8

Closed webstep-or closed 6 years ago

webstep-or commented 8 years ago

example with tilematrix 8 and TileMatrixSet EPSG:32633 should be TileMatrix=EPSG:32633:8 not TileMatrix=8

pfeely commented 8 years ago

I had the same issue - a quick fix was to change the url to use the tilematrixset paramater and append the zoom level, then remove the tilematrix paramter

var params = L.Util.getParamString(this.wmtsParams, url) + "&tilematrix="+this.wmtsParams.tilematrixset+":" + zoom + "&tilerow=" + tilerow +"&tilecol=" + tilecol ; return url + params;

eg:

var vicmap = L.tileLayer.wmts('https://api.maps.vic.gov.au/geowebcacheWM/service/wmts?', { layer: "SATELLITE_WM",
format: "image/png", tilematrixset: "EPSG:3857_SATELLITE_WM", tileSize: 512, maxZoom : 19, minZoom: 6 });

jordanparfitt commented 6 years ago

I updated line 54 to this: seems to have worked

return url + L.Util.getParamString(this.wmtsParams, url) + "&tilematrix=" + this.wmtsParams.tilematrixSet + ":" + ident + "&tilerow=" + tilerow +"&tilecol=" + tilecol;

alexandre-melard commented 6 years ago

thank you