From b9313e76f4fed26b2fbfc953e6c3e3de6976616d Mon Sep 17 00:00:00 2001 From: pjeweb Date: Wed, 8 Nov 2017 14:36:46 +0100 Subject: [PATCH] Always use source projection loading image tiles Use the defined source projection despite it being equivalent to the rendering projection to enable using the specified alias code name instead of the code provided by the renderer's projection object. For example: The server only knows the name "EPSG:900913", which is an alias for the equivalent "EPSG:3857", that the renderer uses (by default). --- src/ol/source/tileimage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/source/tileimage.js b/src/ol/source/tileimage.js index 4d5d8f9b5c..d9bb818eba 100644 --- a/src/ol/source/tileimage.js +++ b/src/ol/source/tileimage.js @@ -241,7 +241,7 @@ ol.source.TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection !this.getProjection() || !projection || ol.proj.equivalent(this.getProjection(), projection)) { - return this.getTileInternal(z, x, y, pixelRatio, /** @type {!ol.proj.Projection} */ (projection)); + return this.getTileInternal(z, x, y, pixelRatio, /** @type {!ol.proj.Projection} */ (this.getProjection() || projection)); } else { var cache = this.getTileCacheForProjection(projection); var tileCoord = [z, x, y];