Skip to content

Commit

Permalink
Use linear interpolation for rotated icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Wojciechowski committed Jun 15, 2016
1 parent fae679c commit 5fc04a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/data/bucket/symbol_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ SymbolBucket.prototype.populateBuffers = function(collisionTile, stacks, icons)
}
if (image.pixelRatio !== 1) {
this.iconsNeedLinear = true;
} else if (layout['icon-rotate'] !== 0 || !this.layer.isLayoutValueFeatureConstant('icon-rotate')) {
this.iconsNeedLinear = true;
}
}
} else {
Expand Down
10 changes: 10 additions & 0 deletions js/style/style_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,16 @@ StyleLayer.prototype = util.inherit(Evented, {
}
},

isLayoutValueFeatureConstant: function(name) {
var declaration = this._layoutDeclarations[name];

if (declaration) {
return declaration.isFeatureConstant;
} else {
return true;
}
},

isPaintValueZoomConstant: function(name) {
var transition = this._paintTransitions[name];

Expand Down

0 comments on commit 5fc04a0

Please sign in to comment.