leaflet.TileLayer.WMTS
leaflet.TileLayer.WMTS copied to clipboard
Plugin assumes a prefix on TileMatrix parameter
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.
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>