Not sure if this is related to a Leaflet version change (Using RC 1.0.0) or a bug in the plugin
The following function is assuming zoom as a second parameter
getTileUrl: function (tilePoint,zoom) { // (Point, Number) -> String
But zoom is undefined and not available.
Further down the code uses "zoom=map.getZoom();" - but this cannot be relied up because the getTileUrl function is fired before the zoom end event
So when you zoom in and out it uses the old zoom level and gets the tile calculation wrong - which can throw an error from the WMTS service
Solution:
getTileUrl: function (tilePoint) { var map = this._map; var zoom = tilePoint.z; //Next zoom level
Not sure if this is related to a Leaflet version change (Using RC 1.0.0) or a bug in the plugin
The following function is assuming zoom as a second parameter
getTileUrl: function (tilePoint,zoom) { // (Point, Number) -> String
But zoom is undefined and not available.
Further down the code uses "zoom=map.getZoom();" - but this cannot be relied up because the getTileUrl function is fired before the zoom end event So when you zoom in and out it uses the old zoom level and gets the tile calculation wrong - which can throw an error from the WMTS service
Solution:
getTileUrl: function (tilePoint) { var map = this._map; var zoom = tilePoint.z; //Next zoom level