Adding subdomains to WMS and WMTS providers


The new UrlTemplateImageryProvider handles subdomains, however it is not the case of

the WebMapServiceImageryProvider and the WebMapTileServiceImageryProvider.

The WMS provider misses a ‘subdomains’ option in the constructor that could be passed to the UrlTemplateImageryProvider constructor.

For WMTS, subdomains handling can easily be added to

Is it the right approach? If yes I can create a PR for this next week.


Guillaume Beraudo

Hi Guillaume,

Am I understanding you correctly that you would also pass a templated URL (i.e. with an {s} in the URL) to the constructor of WebMapServiceImagerProvider? If so, that sounds reasonable to me.