Pass pixel ratio to ol.renderer.canvas.VectorLayer#renderFeature
This commit is contained in:
@@ -206,8 +206,8 @@ ol.renderer.canvas.VectorLayer.prototype.prepareFrame =
|
|||||||
*/
|
*/
|
||||||
function(feature) {
|
function(feature) {
|
||||||
this.dirty_ = this.dirty_ ||
|
this.dirty_ = this.dirty_ ||
|
||||||
this.renderFeature(feature, frameStateResolution, styleFunction,
|
this.renderFeature(feature, frameStateResolution, pixelRatio,
|
||||||
replayGroup);
|
styleFunction, replayGroup);
|
||||||
}, this);
|
}, this);
|
||||||
replayGroup.finish();
|
replayGroup.finish();
|
||||||
|
|
||||||
@@ -224,12 +224,13 @@ ol.renderer.canvas.VectorLayer.prototype.prepareFrame =
|
|||||||
/**
|
/**
|
||||||
* @param {ol.Feature} feature Feature.
|
* @param {ol.Feature} feature Feature.
|
||||||
* @param {number} resolution Resolution.
|
* @param {number} resolution Resolution.
|
||||||
|
* @param {number} pixelRatio Pixel ratio.
|
||||||
* @param {ol.style.StyleFunction} styleFunction Style function.
|
* @param {ol.style.StyleFunction} styleFunction Style function.
|
||||||
* @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
|
* @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
|
||||||
* @return {boolean} `true` if an image is loading.
|
* @return {boolean} `true` if an image is loading.
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.VectorLayer.prototype.renderFeature =
|
ol.renderer.canvas.VectorLayer.prototype.renderFeature =
|
||||||
function(feature, resolution, styleFunction, replayGroup) {
|
function(feature, resolution, pixelRatio, styleFunction, replayGroup) {
|
||||||
var loading = false;
|
var loading = false;
|
||||||
var styles = styleFunction(feature, resolution);
|
var styles = styleFunction(feature, resolution);
|
||||||
// FIXME if styles is null, should we use the default style?
|
// FIXME if styles is null, should we use the default style?
|
||||||
|
|||||||
Reference in New Issue
Block a user