diff --git a/src/app/core/layers/imagelayer.js b/src/app/core/layers/imagelayer.js index bcd1ddcd7..cf834c571 100644 --- a/src/app/core/layers/imagelayer.js +++ b/src/app/core/layers/imagelayer.js @@ -36,6 +36,7 @@ function __(name, value) { * @param config.bbox * @param config.capabilities * @param config.cache_url + * @param config.cache_provider @since 3.10.0 * @param config.baselayer * @param config.geometrytype * @param config.editops diff --git a/src/app/core/layers/map/xyzlayer.js b/src/app/core/layers/map/xyzlayer.js index 9a65a0c5b..ff9c6b70b 100644 --- a/src/app/core/layers/map/xyzlayer.js +++ b/src/app/core/layers/map/xyzlayer.js @@ -42,7 +42,7 @@ proto.isVisible = function(){ proto._makeOlLayer = function(){ this._olLayer = new RasterLayers.XYZLayer({ - url: `${this.layer.getCacheUrl()}/{z}/{x}/{y}.png`, + url: `${this.layer.getCacheUrl()}`, maxZoom: 20, extent: this.config.extent, iframe_internal: this.iframe_internal, diff --git a/src/app/core/layers/mixins/geo.js b/src/app/core/layers/mixins/geo.js index 72b744d53..7d9389cab 100644 --- a/src/app/core/layers/mixins/geo.js +++ b/src/app/core/layers/mixins/geo.js @@ -499,7 +499,14 @@ proto.isCached = function() { }; proto.getCacheUrl = function() { - if (this.isCached()) return this.config.cache_url; + if (this.isCached()) { + /** @since 3.10.0 **/ + if (this.config.cache_provider && 'mapproxy' === this.config.cache_provider) { + //in the case of mapproxy provider, cache_url contains {z}/{x}/{-y}.png set + return this.config.cache_url; + } + return `${this.config.cache_url}/{z}/{x}/{y}.png`; + } }; // return if layer has inverted axis