Update TileWMS.coordKeyPrefix_ on setUrls

Outdated coordKeyPrefix_ causes the TileWMS layer to flicker
on the first updateParams call.
This commit is contained in:
Rafał Rutkowski
2016-07-21 09:53:47 +02:00
parent d0302ba92a
commit 3157ccb2f2
2 changed files with 21 additions and 0 deletions

View File

@@ -355,6 +355,14 @@ ol.source.TileWMS.prototype.fixedTileUrlFunction = function(tileCoord, pixelRati
pixelRatio, projection, baseParams);
};
/**
* @inheritDoc
*/
ol.source.TileWMS.prototype.setUrls = function(urls) {
ol.source.TileImage.prototype.setUrls.call(this, urls);
this.resetCoordKeyPrefix_();
};
/**
* Update the user-provided params.