I’m trying to use the subdomains feature provided by UrlTemplateImageryProvider (and available to WebMapServiceImageryProvider and WebMapTileServiceImageryProvider constructors), but I’m seeing that by simply adding the {s} template variable to an WMTS URL, all tile requests issued by WebMapTileServiceImageryProvider, while the subdomain substitutions appear to work, are dropping all query parameters, which are obviously critical.
If I just remove the {s} template variable from the URL, all query parameters are attached to the tile requests. I’ve used the same subdomains feature on WebMapServiceImageryProvider and it’s behaving as expected.
This is a Sandcastle example showing the problem. Ignore the fact that the tile requests will still fail with 401—just see the actual request URLs being sent in the browser debugger.