alexandre-melard / leaflet.TileLayer.WMTS

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

All layer options are appended to the WMTS tile URLs #3

Closed flansch closed 9 years ago

flansch commented 9 years ago

Inside the initialize function all layer options (except matrixIds) are copied to the wmtsParams object. This happens because the layer's options property doesn't have any properties itself, the moment the check for !this.options.hasOwnProperty(i) takes place. So all those options (in my case attribution, subdomains, detectRetina, minZoom and maxZoom) and their values are appended to the tile URL. Although the tiles are loaded like they should, it makes the URLs more complex and difficult to read when debugging.

flansch commented 9 years ago

I now realized that I was using the development version (0.8-dev, Oct. 22) of Leaflet. After switching to the stable version 0.7.3 the problem disappeared.