Add pixel ratio to label cache key

This commit is contained in:
Andreas Hocevar
2017-11-30 01:02:13 +01:00
parent 4e8714d619
commit 74bf846ffe
2 changed files with 2 additions and 2 deletions

View File

@@ -281,7 +281,7 @@ ol.render.canvas.TextReplay.prototype.drawText = function(geometry, feature) {
*/
ol.render.canvas.TextReplay.prototype.getImage = function(text, textKey, fillKey, strokeKey) {
var label;
var key = strokeKey + textKey + text + fillKey;
var key = strokeKey + textKey + text + fillKey + this.pixelRatio;
var labelCache = ol.render.canvas.labelCache;
if (!labelCache.containsKey(key)) {