You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
802 B
2 lines
802 B
2 years ago
|
"use strict";L.TileLayer.WMTS=L.TileLayer.extend({defaultWmtsParams:{service:"WMTS",request:"GetTile",version:"1.0.0",layer:"",style:"default",tileMatrixSet:"",format:"image/jpeg"},initialize:function(t,e){this._url=t;const i=L.extend({},this.defaultWmtsParams);for(const r in e)r in this.options||(i[r]=e[r]);var s=(e=L.setOptions(this,e)).detectRetina&&retina?2:1,t=this.getTileSize();i.width=t.x*s,i.height=t.y*s,this.wmtsParams=i},getTileUrl:function(t){this.wmtsParams.tileMatrix=this._tileZoom.toString();var e=L.Util.template(this._url,{s:this._getSubdomain(t)}),t={...this.wmtsParams,tileRow:t.y,tileCol:t.x};return e+L.Util.getParamString(t)},setParams:function(t,e){return L.extend(this.wmtsParams,t),e||this.redraw(),this}}),L.tileLayer.wmts=function(t,e){return new L.TileLayer.WMTS(t,e)};
|