leaflet.TileLayer.WMTS icon indicating copy to clipboard operation
leaflet.TileLayer.WMTS copied to clipboard

Plugin assumes a prefix on TileMatrix parameter

Open jimsafley opened this issue 5 years ago • 1 comments

This line in getTileUrl() assumes that the WMTS service recognizes a prefix on the TileMatrix parameter:

var tilematrix = this.wmtsParams.tilematrixset + ":" + ident;

The service I'm working with does not recognize a prefix, as you see:

https://services.arcgisonline.com/arcgis/rest/services/Demographics/USA_Population_Density/MapServer/WMTS/?layer=0&style=default&tilematrixset=EPSG%3A3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=6&TileCol=16&TileRow=24

Note that TileMatrix is set to 6 and not to EPSG:3857:6, which this plugin sets automatically.

jimsafley avatar Nov 15 '19 19:11 jimsafley

The WMTS implementation standard does not specify a format for the TileMatrix identifier (beyond being an ows:CodeType). This plugin seems to assume that the TileMatrix identifier will always be <TileMatrixSet identifier>:<TileMatrix identifier>

jimsafley avatar Nov 18 '19 15:11 jimsafley