loleaflet/build/deps.js | 6 -- loleaflet/src/layer/tile/TileLayer.WMS.js | 85 ------------------------------ 2 files changed, 91 deletions(-)
New commits: commit 4e848bfa4ec233951e2f3fd737398b776e9a1dcf Author: Henry Castro <hcas...@collabora.com> AuthorDate: Tue Oct 15 16:45:06 2019 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Tue Oct 15 22:47:59 2019 +0200 loleaflet: remove unused TileLayer.WMS.js file A Web Map Service (WMS) protocol is not used for Document Tiled rendering. Probably in the near future if it is required, we can restore back the file, but meanwhile it is a dead code. Change-Id: I7f622e335eead6f1ef8d8250394b56b43ae3ea1f Reviewed-on: https://gerrit.libreoffice.org/80862 Reviewed-by: Henry Castro <hcas...@collabora.com> Tested-by: Henry Castro <hcas...@collabora.com> diff --git a/loleaflet/build/deps.js b/loleaflet/build/deps.js index 782ddfc84..28eb45cf9 100644 --- a/loleaflet/build/deps.js +++ b/loleaflet/build/deps.js @@ -42,12 +42,6 @@ var deps = { deps: ['GridLayer'] }, - TileLayerWMS: { - src: ['layer/tile/TileLayer.WMS.js'], - desc: 'WMS tile layer.', - deps: ['TileLayer'] - }, - WriterTileLayer: { src: ['layer/tile/WriterTileLayer.js'], desc: 'Writer tile layer.', diff --git a/loleaflet/src/layer/tile/TileLayer.WMS.js b/loleaflet/src/layer/tile/TileLayer.WMS.js deleted file mode 100644 index 3e5630731..000000000 --- a/loleaflet/src/layer/tile/TileLayer.WMS.js +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- js-indent-level: 8 -*- */ -/* - * L.TileLayer.WMS is used for WMS tile layers. - */ - -L.TileLayer.WMS = L.TileLayer.extend({ - - defaultWmsParams: { - service: 'WMS', - request: 'GetMap', - version: '1.1.1', - layers: '', - styles: '', - format: 'image/jpeg', - transparent: false - }, - - options: { - crs: null, - uppercase: false - }, - - initialize: function (url, options) { - - this._url = url; - - var wmsParams = L.extend({}, this.defaultWmsParams); - - // all keys that are not TileLayer options go to WMS params - for (var i in options) { - if (!(i in this.options)) { - wmsParams[i] = options[i]; - } - } - - options = L.setOptions(this, options); - - wmsParams.width = wmsParams.height = options.tileSize * (options.detectRetina && L.Browser.retina ? 2 : 1); - - this.wmsParams = wmsParams; - }, - - onAdd: function (map) { - - this._crs = this.options.crs || map.options.crs; - this._wmsVersion = parseFloat(this.wmsParams.version); - - var projectionKey = this._wmsVersion >= 1.3 ? 'crs' : 'srs'; - this.wmsParams[projectionKey] = this._crs.code; - - L.TileLayer.prototype.onAdd.call(this, map); - }, - - getTileUrl: function (coords) { - - var tileBounds = this._tileCoordsToBounds(coords), - nw = this._crs.project(tileBounds.getNorthWest()), - se = this._crs.project(tileBounds.getSouthEast()), - - bbox = (this._wmsVersion >= 1.3 && this._crs === L.CRS.EPSG4326 ? - [se.y, nw.x, nw.y, se.x] : - [nw.x, se.y, se.x, nw.y]).join(','), - - url = L.TileLayer.prototype.getTileUrl.call(this, coords); - - return url + - L.Util.getParamString(this.wmsParams, url, this.options.uppercase) + - (this.options.uppercase ? '&BBOX=' : '&bbox=') + bbox; - }, - - setParams: function (params, noRedraw) { - - L.extend(this.wmsParams, params); - - if (!noRedraw) { - this.redraw(); - } - - return this; - } -}); - -L.tileLayer.wms = function (url, options) { - return new L.TileLayer.WMS(url, options); -}; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits